playlight-sdk 0.2.2 → 0.2.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,4 +1,4 @@
1
- var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.defineProperty,v=t=>{throw TypeError(t)},p=(t,e,n)=>e.has(t)||v("Cannot "+n),h=(t,e,n)=>(p(t,e,"read from private field"),n?n.call(t):e.get(t)),g=(t,e,n)=>e.has(t)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),m=(t,e,n,r)=>(p(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),y=(t,e,n)=>(p(t,e,"access private method"),n);var b=Array.isArray,w=Array.prototype.indexOf,x=Array.from,$=Object.defineProperty,_=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyDescriptors,C=Object.prototype,S=Array.prototype,M=Object.getPrototypeOf;function P(t){return"function"==typeof t}const I=()=>{};function j(t){return t()}function z(t){for(var e=0;e<t.length;e++)t[e]()}const E=256,N=1024,O=2048,T=4096,A=8192,B=16384,W=65536,D=Symbol("$state"),L=Symbol("legacy props"),q=Symbol("");function G(t){return t===this.v}function F(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function R(t){return!F(t,this.v)}let H=!1;const V=Symbol();function K(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let U=null;function Y(t){U=t}function Z(t,e=!1,n){U={p:U,c:null,e:null,m:!1,s:t,x:null,l:null},H&&!e&&(U.l={s:null,u:null,r1:[],r2:Q(!1)})}function J(t){const e=U;if(null!==e){const t=e.e;if(null!==t){var n=le,r=re;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];ae(i.effect),ie(i.reaction),It(i.fn)}}finally{ae(n),ie(r)}}U=e.p,e.m=!0}return{}}function X(){return!H||null!==U&&null===U.l}function Q(t,e){return{f:0,v:t,reactions:null,equals:G,rv:0,wv:0}}function tt(t){return rt(Q(t))}function et(t,e=!1){var n;const r=Q(t);return e||(r.equals=R),H&&null!==U&&null!==U.l&&((n=U.l).s??(n.s=[])).push(r),r}function nt(t,e=!1){return rt(et(t,e))}function rt(t){return null!==re&&!oe&&2&re.f&&(null===se?se=[t]:se.push(t)),t}function ot(t,e){return null!==re&&!oe&&X()&&18&re.f&&(null===se||!se.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),it(t,e)}function it(t,e){return t.equals(e)||(t.v,t.v=e,t.wv=he(),at(t,O),X()&&null!==le&&le.f&N&&!(96&le.f)&&(null===de?de=[t]:de.push(t))),e}function lt(t,e=1){var n=Pe(t),r=1===e?n++:n--;return ot(t,n),r}function at(t,e){var n=t.reactions;if(null!==n)for(var r=X(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&O||(r||l!==le)&&(ze(l,e),1280&a&&(2&a?at(l,T):Se(l)))}}function st(t,e=null,n){if("object"!=typeof t||null===t||D in t)return t;const r=M(t);if(r!==C&&r!==S)return t;var o,i=new Map,l=b(t),a=Q(0);return l&&i.set("length",Q(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var r=i.get(e);return void 0===r?(r=Q(n.value),i.set(e,r)):ot(r,st(n.value,o)),!0},deleteProperty(t,e){var n=i.get(e);if(void 0===n)e in t&&i.set(e,Q(V));else{if(l&&"string"==typeof e){var r=i.get("length"),o=Number(e);Number.isInteger(o)&&o<r.v&&ot(r,o)}ot(n,V),ut(a)}return!0},get(e,n,r){var l;if(n===D)return t;var a=i.get(n),s=n in e;if(void 0!==a||s&&!(null==(l=_(e,n))?void 0:l.writable)||(a=Q(st(s?e[n]:V,o)),i.set(n,a)),void 0!==a){var u=Pe(a);return u===V?void 0:u}return Reflect.get(e,n,r)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var r=i.get(e);r&&(n.value=Pe(r))}else if(void 0===n){var o=i.get(e),l=null==o?void 0:o.v;if(void 0!==o&&l!==V)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){var n;if(e===D)return!0;var r=i.get(e),l=void 0!==r&&r.v!==V||Reflect.has(t,e);return!((void 0!==r||null!==le&&(!l||(null==(n=_(t,e))?void 0:n.writable)))&&(void 0===r&&(r=Q(l?st(t[e],o):V),i.set(e,r)),Pe(r)===V))&&l},set(t,e,n,r){var s,u=i.get(e),c=e in t;if(l&&"length"===e)for(var d=n;d<u.v;d+=1){var f=i.get(d+"");void 0!==f?ot(f,V):d in t&&(f=Q(V),i.set(d+"",f))}void 0===u?c&&!(null==(s=_(t,e))?void 0:s.writable)||(ot(u=Q(void 0),st(n,o)),i.set(e,u)):(c=u.v!==V,ot(u,st(n,o)));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(r,n),!c){if(l&&"string"==typeof e){var p=i.get("length"),h=Number(e);Number.isInteger(h)&&h>=p.v&&ot(p,h+1)}ut(a)}return!0},ownKeys(t){Pe(a);var e=Reflect.ownKeys(t).filter((t=>{var e=i.get(t);return void 0===e||e.v!==V}));for(var[n,r]of i)r.v===V||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ut(t,e=1){ot(t,t.v+e)}var ct,dt,ft,vt,pt;function ht(t=""){return document.createTextNode(t)}function gt(t){return vt.call(t)}function mt(t){return pt.call(t)}function yt(t,e){return gt(t)}function bt(t,e){var n=gt(t);return n instanceof Comment&&""===n.data?mt(n):n}function wt(t,e=1,n=!1){let r=t;for(;e--;)r=mt(r);return r}function xt(t){var e=2050,n=null!==re&&2&re.f?re:null;return null===le||null!==n&&n.f&E?e|=E:le.f|=1048576,{ctx:U,deps:null,effects:null,equals:G,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??le}}function $t(t){const e=xt(t);return e.equals=R,e}function _t(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)Wt(e[n])}}function kt(t){var e=function(t){var e,n=le;ae(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{_t(t),e=be(t)}finally{ae(n)}return e}(t);ze(t,(pe||t.f&E)&&null!==t.deps?T:N),t.equals(e)||(t.v=e,t.wv=he())}function Ct(t){null===le&&null===re&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==re&&re.f&E&&null===le&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),te&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function St(t,e,n,r=!0){var o,i,l,a=le,s={ctx:U,deps:null,nodes_start:null,nodes_end:null,f:t|O,first:null,fn:e,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(n)try{$e(s),s.f|=32768}catch(o){throw Wt(s),o}else null!==e&&Se(s);if((!n||null!==s.deps||null!==s.first||null!==s.nodes_start||null!==s.teardown||1048704&s.f)&&r&&(null!==a&&(o=s,null===(l=(i=a).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==re&&2&re.f)){var u=re;(u.effects??(u.effects=[])).push(s)}return s}function Mt(t){const e=St(8,null,!1);return ze(e,N),e.teardown=t,e}function Pt(t){if(Ct(),!(null!==le&&32&le.f&&null!==U)||U.m)return It(t);var e=U;(e.e??(e.e=[])).push({fn:t,effect:le,reaction:re})}function It(t){return St(4,t,!1)}function jt(t,e){var n=U,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=Et((()=>{t(),r.ran||(r.ran=!0,ot(n.l.r2,!0),Ie(e))}))}function zt(){var t=U;Et((()=>{if(Pe(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&N&&ze(n,T),ge(n)&&$e(n),e.ran=!1}t.l.r2.v=!1}}))}function Et(t){return St(8,t,!0)}function Nt(t,e=[],n=xt){const r=e.map(n);return Ot((()=>t(...r.map(Pe))))}function Ot(t,e=0){return St(24|e,t,!0)}function Tt(t,e=!0){return St(40,t,!0,e)}function At(t){var e=t.teardown;if(null!==e){const t=te,n=re;ee(!0),ie(null);try{e.call(null)}finally{ee(t),ie(n)}}}function Bt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;64&n.f?n.parent=null:Wt(n,e),n=r}}function Wt(t,e=!0){var n=!1;if((e||524288&t.f)&&null!==t.nodes_start){for(var r=t.nodes_start,o=t.nodes_end;null!==r;){var i=r===o?null:mt(r);r.remove(),r=i}n=!0}Bt(t,e&&!n),xe(t,0),ze(t,B);var l=t.transitions;if(null!==l)for(const s of l)s.stop();At(t);var a=t.parent;null!==a&&null!==a.first&&Dt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Dt(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 Lt(t,e){var n=[];Gt(t,n,!0),qt(n,(()=>{Wt(t),e&&e()}))}function qt(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function Gt(t,e,n){if(!(t.f&A)){if(t.f^=A,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;Gt(r,e,!!(r.f&W||32&r.f)&&n),r=o}}}function Ft(t){Rt(t,!0)}function Rt(t,e){if(t.f&A){t.f^=A,t.f&N||(t.f^=N),ge(t)&&(ze(t,O),Se(t));for(var n=t.first;null!==n;){var r=n.next;Rt(n,!!(n.f&W||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let Ht=[],Vt=[];function Kt(){var t=Ht;Ht=[],z(t)}function Ut(t){0===Ht.length&&queueMicrotask(Kt),Ht.push(t)}function Yt(){var t;Ht.length>0&&Kt(),Vt.length>0&&(t=Vt,Vt=[],z(t))}let Zt=!1,Jt=!1,Xt=null,Qt=!1,te=!1;function ee(t){te=t}let ne=[],re=null,oe=!1;function ie(t){re=t}let le=null;function ae(t){le=t}let se=null,ue=null,ce=0,de=null,fe=1,ve=0,pe=!1;function he(){return++fe}function ge(t){var e,n=t.f;if(n&O)return!0;if(n&T){var r=t.deps,o=!!(n&E);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==le&&!pe,u=r.length;if(a||s){var c=t,d=c.parent;for(i=0;i<u;i++)l=r[i],!a&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(c))||(l.reactions??(l.reactions=[])).push(c);a&&(c.f^=512),!s||null===d||d.f&E||(c.f^=E)}for(i=0;i<u;i++)if(ge(l=r[i])&&kt(l),l.wv>t.wv)return!0}o&&(null===le||pe)||ze(t,N)}return!1}function me(t,e,n,r){if(Zt){if(null===n&&(Zt=!1),!((o=e).f&B||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(Zt=!0),function(t,e){for(var n=e;null!==n;){if(128&n.f)try{return void n.fn(t)}catch{n.f^=128}n=n.parent}throw Zt=!1,t}(t,e);var o}function ye(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];2&i.f?ye(i,e,!1):e===i&&(n?ze(i,O):i.f&N&&ze(i,T),Se(i))}}function be(t){var e,n=ue,r=ce,o=de,i=re,l=pe,a=se,s=U,u=oe,c=t.f;ue=null,ce=0,de=null,pe=!!(c&E)&&(oe||!Qt||null===re),re=96&c?null:t,se=null,Y(t.ctx),oe=!1,ve++;try{var d=(0,t.fn)(),f=t.deps;if(null!==ue){var v;if(xe(t,ce),null!==f&&ce>0)for(f.length=ce+ue.length,v=0;v<ue.length;v++)f[ce+v]=ue[v];else t.deps=f=ue;if(!pe)for(v=ce;v<f.length;v++)((e=f[v]).reactions??(e.reactions=[])).push(t)}else null!==f&&ce<f.length&&(xe(t,ce),f.length=ce);if(X()&&null!==de&&!oe&&null!==f&&!(6146&t.f))for(v=0;v<de.length;v++)ye(de[v],t);return null!==i&&ve++,d}finally{ue=n,ce=r,de=o,re=i,pe=l,se=a,Y(s),oe=u}}function we(t,e){let n=e.reactions;if(null!==n){var r=w.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===ue||!ue.includes(e))&&(ze(e,T),768&e.f||(e.f^=512),_t(e),xe(e,0))}function xe(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)we(t,n[r])}function $e(t){var e=t.f;if(!(e&B)){ze(t,N);var n=le,r=U,o=Qt;le=t,Qt=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||Wt(e),e=n}}(t):Bt(t),At(t);var i=be(t);t.teardown="function"==typeof i?i:null,t.wv=fe,t.deps}catch(l){me(l,t,n,r||t.ctx)}finally{Qt=o,le=n}}}function _e(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===Xt)throw t;me(t,Xt,null)}}function ke(){var t=Qt;try{var e=0;for(Qt=!0;ne.length>0;){e++>1e3&&_e();var n=ne,r=n.length;ne=[];for(var o=0;o<r;o++)Ce(Me(n[o]))}}finally{Jt=!1,Qt=t,Xt=null}}function Ce(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{ge(r)&&($e(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?Dt(r):r.fn=null))}catch(o){me(o,r,null,r.ctx)}}}function Se(t){Jt||(Jt=!0,queueMicrotask(ke));for(var e=Xt=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&N))return;e.f^=N}}ne.push(e)}function Me(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&r&N||r&A)){if(4&r)e.push(n);else if(o)n.f^=N;else{var i=re;try{re=n,ge(n)&&$e(n)}catch(s){me(s,n,null,n.ctx)}finally{re=i}}var l=n.first;if(null!==l){n=l;continue}}var a=n.parent;for(n=n.next;null===n&&null!==a;)n=a.next,a=a.parent}return e}function Pe(t){var e=!!(2&t.f);if(null===re||oe){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&E||(n.f^=E)}}else{null!==se&&se.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}();var o=re.deps;t.rv<ve&&(t.rv=ve,null===ue&&null!==o&&o[ce]===t?ce++:null===ue?ue=[t]:pe&&ue.includes(t)||ue.push(t))}return e&&ge(n=t)&&kt(n),t.v}function Ie(t){var e=oe;try{return oe=!0,t()}finally{oe=e}}const je=-7169;function ze(t,e){t.f=t.f&je|e}function Ee(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(D in t)Ne(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&D in n&&Ne(n)}}function Ne(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{Ne(t[o],e)}catch(n){}const r=M(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=k(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Oe(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const Te=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ae(t){return Te.includes(t)}const Be={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 We(t){return t=t.toLowerCase(),Be[t]??t}const De=["touchstart","touchmove"];function Le(t){return De.includes(t)}function qe(t,e){if(e){const e=document.body;t.autofocus=!0,Ut((()=>{document.activeElement===e&&t.focus()}))}}let Ge=!1;function Fe(t){var e=re,n=le;ie(null),ae(null);try{return t()}finally{ie(e),ae(n)}}const Re=new Set,He=new Set;function Ve(t,e,n,r={}){function o(t){if(r.capture||Ye.call(e,t),!t.cancelBubble)return Fe((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?Ut((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Ke(t,e,n,r,o){var i={capture:r,passive:o},l=Ve(t,e,n,i);e!==document.body&&e!==window&&e!==document||Mt((()=>{e.removeEventListener(t,l,i)}))}function Ue(t){for(var e=0;e<t.length;e++)Re.add(t[e]);for(var n of He)n(t)}function Ye(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,a=0,s=t.__root;if(s){var u=i.indexOf(s);if(-1!==u&&(n===document||n===window))return void(t.__root=n);var c=i.indexOf(n);if(-1===c)return;u<=c&&(a=u)}if((l=i[a]||t.target)!==n){$(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=re,f=le;ie(null),ae(null);try{for(var v,p=[];null!==l;){var h=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(b(g)){var[m,...y]=g;m.apply(l,[t,...y])}else g.call(l,t)}catch(w){v?p.push(w):v=w}if(t.cancelBubble||h===n||null===h)break;l=h}if(v){for(let t of p)queueMicrotask((()=>{throw t}));throw v}}finally{t.__root=n,delete t.currentTarget,ie(d),ae(f)}}}function Ze(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function Je(t,e){var n=le;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Xe(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ze(i?t:"<!>"+t),r||(n=gt(n)));var e=o||ft?document.importNode(n,!0):n.cloneNode(!0);return r?Je(gt(e),e.lastChild):Je(e,e),e}}function Qe(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=gt(Ze(o));r=gt(t)}var e=r.cloneNode(!0);return Je(e,e),e}}function tn(t=""){var e=ht(t+"");return Je(e,e),e}function en(){var t=document.createDocumentFragment(),e=document.createComment(""),n=ht();return t.append(e,n),Je(e,n),t}function nn(t,e){null!==t&&t.before(e)}let rn=!0;function on(t){rn=t}function ln(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 an(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===ct){ct=window,dt=document,ft=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype;vt=_(e,"firstChild").get,pt=_(e,"nextSibling").get,t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0,Text.prototype.__t=void 0}}();var a=new Set,s=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!a.has(r)){a.add(r);var o=Le(r);e.addEventListener(r,Ye,{passive:o});var i=sn.get(r);void 0===i?(document.addEventListener(r,Ye,{passive:o}),sn.set(r,1)):sn.set(r,i+1)}}};s(x(Re)),He.add(s);var u=void 0,c=function(t){const e=St(64,t,!0);return(t={})=>new Promise((n=>{t.outro?Lt(e,(()=>{Wt(e),n(void 0)})):(Wt(e),n(void 0))}))}((()=>{var c=n??e.appendChild(ht());return Tt((()=>{i&&(Z({}),U.c=i),o&&(r.$$events=o),rn=l,u=t(c,r)||{},rn=!0,i&&J()})),()=>{var t;for(var r of a){e.removeEventListener(r,Ye);var o=sn.get(r);0==--o?(document.removeEventListener(r,Ye),sn.delete(r)):sn.set(r,o)}He.delete(s),c!==n&&(null==(t=c.parentNode)||t.removeChild(c))}}));return un.set(u,c),u}(t,e)}const sn=new Map;let un=new WeakMap;function cn(t,e,[n,r]=[0,0]){var o=t,i=null,l=null,a=V,s=!1;const u=(t,e=!0)=>{s=!0,c(e,t)},c=(t,e)=>{a!==(a=t)&&(a?(i?Ft(i):e&&(i=Tt((()=>e(o)))),l&&Lt(l,(()=>{l=null}))):(l?Ft(l):e&&(l=Tt((()=>e(o,[n+1,r])))),i&&Lt(i,(()=>{i=null}))))};Ot((()=>{s=!1,e(u),s||c(null,null)}),n>0?W:0)}let dn=null;function fn(t){dn=t}function vn(t,e){return e}function pn(t,e,n,r,o,i=null){var l=t,a={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(ht()));var s=null,u=!1,c=$t((()=>{var t=n();return b(t)?t:null==t?[]:x(t)}));Ot((()=>{var t=Pe(c),d=t.length;u&&0===d||(u=0===d,function(t,e,n,r,o,i,l){var a,s,u,c,d,f,v,p,h,g,m=!!(8&o),y=!!(3&o),b=t.length,w=e.items,$=e.first,_=null,k=[],C=[];if(m)for(g=0;g<b;g+=1)p=i(v=t[g],g),void 0!==(h=w.get(p))&&(null==(a=h.a)||a.measure(),(f??(f=new Set)).add(h));for(g=0;g<b;g+=1)if(p=i(v=t[g],g),void 0!==(h=w.get(p))){if(y&&hn(h,v,g,o),h.e.f&A&&(Ft(h.e),m&&(null==(s=h.a)||s.unfix(),(f??(f=new Set)).delete(h))),h!==$){if(void 0!==d&&d.has(h)){if(k.length<C.length){var S,M=C[0];_=M.prev;var P=k[0],I=k[k.length-1];for(S=0;S<k.length;S+=1)mn(k[S],M,n);for(S=0;S<C.length;S+=1)d.delete(C[S]);yn(e,P.prev,I.next),yn(e,_,P),yn(e,I,M),$=M,_=I,g-=1,k=[],C=[]}else d.delete(h),mn(h,$,n),yn(e,h.prev,h.next),yn(e,h,null===_?e.first:_.next),yn(e,_,h),_=h;continue}for(k=[],C=[];null!==$&&$.k!==p;)$.e.f&A||(d??(d=new Set)).add($),C.push($),$=$.next;if(null===$)continue;h=$}k.push(h),_=h,$=h.next}else _=gn($?$.e.nodes_start:n,e,_,null===_?e.first:_.next,v,p,g,r,o,l),w.set(p,_),k=[],C=[],$=_.next;if(null!==$||void 0!==d){for(var j=void 0===d?[]:x(d);null!==$;)$.e.f&A||j.push($),$=$.next;var z=j.length;if(z>0){var E=4&o&&0===b?n:null;if(m){for(g=0;g<z;g+=1)null==(u=j[g].a)||u.measure();for(g=0;g<z;g+=1)null==(c=j[g].a)||c.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)Gt(e[l].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var s=n.parentNode;s.textContent="",s.append(n),r.clear(),yn(t,e[0].prev,e[i-1].next)}qt(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),yn(t,o.prev,o.next)),Wt(o.e,!a)}}))}(e,j,E,w)}}m&&Ut((()=>{var t;if(void 0!==f)for(h of f)null==(t=h.a)||t.apply()})),le.first=e.first&&e.first.e,le.last=_&&_.e}(t,a,l,o,e,r,n),null!==i&&(0===d?s?Ft(s):s=Tt((()=>i(l))):null!==s&&Lt(s,(()=>{s=null}))),Pe(c))}))}function hn(t,e,n,r){1&r&&it(t.v,e),2&r?it(t.i,n):t.i=n}function gn(t,e,n,r,o,i,l,a,s,u){var c=dn,d=1&s?16&s?Q(o):et(o):o,f=2&s?Q(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};dn=v;try{return v.e=Tt((()=>a(t,d,f,u)),!1),v.e.prev=n&&n.e,v.e.next=r&&r.e,null===n?e.first=v:(n.next=v,n.e.next=v.e),null!==r&&(r.prev=v,r.e.prev=v.e),v}finally{dn=c}}function mn(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;i!==r;){var l=mt(i);o.before(i),i=l}}function yn(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 bn(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],a=!1;!0===l&&(l=e["default"===n?"children":n],a=!0),void 0===l?null!==o&&o(t):l(t,a?()=>r:r)}function wn(t,e,n){var r,o,i=t;Ot((()=>{r!==(r=e())&&(o&&(Lt(o),o=null),r&&(o=Tt((()=>n(i,r)))))}),W)}function xn(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=xn(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function $n(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=xn(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const _n=[..." \t\n\r\f \v\ufeff"];function kn(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 Cn(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function Sn(t,e,n,r,o,i){if(t.__className!==n){var l=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 a=l+i;0!==l&&!_n.includes(r[l-1])||a!==r.length&&!_n.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==l?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l),t.__className=n}else if(i&&o!==i)for(var a in i){var s=!!i[a];null!=o&&s===!!o[a]||t.classList.toggle(a,s)}return i}function Mn(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 Pn(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,a=!1,s=[];n&&s.push(...Object.keys(n).map(Cn)),r&&s.push(...Object.keys(r).map(Cn));var u=0,c=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(a?"/"===f&&"*"===t[d-1]&&(a=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?a=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!a&&!1===i&&0===l)if(":"===f&&-1===c)c=d;else if(";"===f||d===e-1){if(-1!==c){var v=Cn(t.substring(u,c).trim());s.includes(v)||(";"!==f&&d++,o+=" "+t.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(o+=kn(n)),r&&(o+=kn(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)?(Mn(t,null==n?void 0:n[0],r[0]),Mn(t,null==n?void 0:n[1],r[1],"important")):Mn(t,n,r));return r}const In=Symbol("class"),jn=Symbol("style"),zn=Symbol("is custom element"),En=Symbol("is html");function Nn(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function On(t,e,n,r){var o=An(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[q]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&Wn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Tn(t,e,n,r,o=!1){var i=An(t),l=i[zn],a=!i[En],s=e||{},u="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=$n(n.class):(r||n[In])&&(n.class=null),n[jn]&&(n.style??(n.style=null));var d=Wn(t);for(const m in n){let o=n[m];if(u&&"value"===m&&null==o)t.value=t.__value="",s[m]=o;else if("class"!==m)if("style"!==m){var f=s[m];if(o!==f){s[m]=o;var v=m[0]+m[1];if("$$"!==v)if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=Ae(r);if(Oe(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=o)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=o)if(p)t[`__${r}`]=o,Ue([r]);else{let o=function(t){s[m].call(this,t)};s[n]=Ve(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m)On(t,m,o);else if("autofocus"===m)qe(t,Boolean(o));else if(l||"__value"!==m&&("value"!==m||null==o))if("selected"===m&&u)Nn(t,o);else{var h=m;a||(h=We(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=o||l||g)g||d.includes(h)&&(l||"string"!=typeof o)?t[h]=o:"function"!=typeof o&&On(t,h,o);else if(i[m]=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(m)}else t.value=t.__value=o}}else Pn(t,o,null==e?void 0:e[jn],n[jn]),s[m]=o,s[jn]=n[jn];else Sn(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,o,r,null==e?void 0:e[In],n[In]),s[m]=o,s[In]=n[In]}return s}function An(t){return t.__attributes??(t.__attributes={[zn]:t.nodeName.includes("-"),[En]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var Bn=new Map;function Wn(t){var e,n=Bn.get(t.nodeName);if(n)return n;Bn.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var i in e=k(r))e[i].set&&n.push(i);r=M(r)}return n}const Dn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function Ln(){const t=Dn.now();Dn.tasks.forEach((e=>{e.c(t)||(Dn.tasks.delete(e),e.f())})),0!==Dn.tasks.size&&Dn.tick(Ln)}function qn(t,e){Fe((()=>{t.dispatchEvent(new CustomEvent(e))}))}function Gn(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 Fn(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Gn(t.trim())]=n.trim()}return e}const Rn=t=>t;function Hn(t,e,n,r){var o,i,l,a=!!(4&t),s=e.inert,u=e.style.overflow;function c(){var t=re,i=le;ie(null),ae(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:"both"}))}finally{ie(t),ae(i)}}var d={is_global:a,in(){e.inert=s,qn(e,"introstart"),i=Vn(e,c(),l,1,(()=>{qn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=u}))},out(t){e.inert=!0,qn(e,"outrostart"),l=Vn(e,c(),i,0,(()=>{qn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},f=le;if((f.transitions??(f.transitions=[])).push(d),rn){var v=a;if(!v){for(var p=f.parent;p&&p.f&W;)for(;(p=p.parent)&&!(16&p.f););v=!p||!!(32768&p.f)}v&&It((()=>{Ie((()=>d.in()))}))}}function Vn(t,e,n,r,o){var i=1===r;if(P(e)){var l,a=!1;return Ut((()=>{if(!a){var s=e({direction:i?"in":"out"});l=Vn(t,s,n,r,o)}})),{abort:()=>{a=!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:I,deactivate:I,reset:I,t:()=>r};const{delay:s=0,css:u,tick:c,easing:d=Rn}=e;var f=[];if(i&&void 0===n&&(c&&c(0,1),u)){var v=Fn(u(0,1));f.push(v,v)}var p=()=>1-r,h=t.animate(f,{duration:s});return h.onfinish=()=>{var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,a=e.duration*Math.abs(l),s=[];if(a>0){var f=!1;if(u)for(var v=Math.ceil(a/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),y=Fn(u(m,1-m));s.push(y),f||(f="hidden"===y.overflow)}f&&(t.style.overflow="hidden"),p=()=>{var t=h.currentTime;return i+l*d(t/a)},c&&function(t){let e;0===Dn.tasks.size&&Dn.tick(Ln),new Promise((n=>{Dn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==h.playState)return!1;var t=p();return c(t,1-t),!0}))}(h=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{p=()=>r,null==c||c(r,1-r),o()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=I)},deactivate:()=>{o=I},reset:()=>{0===r&&(null==c||c(1,0))},t:()=>p()}}function Kn(t){var e=t.type;return"number"===e||"range"===e}function Un(t){return""===t?null:+t}const Yn=class{constructor(o){g(this,r),g(this,t,new WeakMap),g(this,e),g(this,n),m(this,n,o)}observe(i,l){var a=h(this,t).get(i)||new Set;return a.add(l),h(this,t).set(i,a),y(this,r,o).call(this).observe(i,h(this,n)),()=>{var n=h(this,t).get(i);n.delete(l),0===n.size&&(h(this,t).delete(i),h(this,e).unobserve(i))}}};var Zn;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakSet,o=function(){return h(this,e)??m(this,e,new ResizeObserver((e=>{for(var n of e)for(var r of(Yn.entries.set(n.target,n),h(this,t).get(n.target)||[]))r(n)})))},((t,e,n)=>{e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(Yn,"symbol"!=typeof(Zn="entries")?Zn+"":Zn,new WeakMap);var Jn=new Yn({box:"border-box"});function Xn(t,e){return t===e||(null==t?void 0:t[D])===e}function Qn(t={},e,n,r){return It((()=>{var r,o;return Et((()=>{r=o,o=[],Ie((()=>{t!==n(...o)&&(e(t,...o),r&&Xn(n(...r),t)&&e(null,...r))}))})),()=>{Ut((()=>{o&&Xn(n(...o),t)&&e(null,...o)}))}})),t}function tr(t=!1){const e=U,n=e.l.u;if(!n)return;let r=()=>Ee(e.s);if(t){let t=0,n={};const o=xt((()=>{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=()=>Pe(o)}var o;n.b.length&&(o=()=>{er(e,r),z(n.b)},Ct(),Et(o)),Pt((()=>{const t=Ie((()=>n.m.map(j)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&Pt((()=>{er(e,r),z(n.a)}))}function er(t,e){if(t.l.s)for(const n of t.l.s)Pe(n);e()}function nr(t,e,n){if(null==t)return e(void 0),I;const r=Ie((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const rr=[];function or(t,e=I){let n=null;const r=new Set;function o(e){if(F(t,e)&&(t=e,n)){const e=!rr.length;for(const n of r)n[1](),rr.push(n,t);if(e){for(let t=0;t<rr.length;t+=2)rr[t][0](rr[t+1]);rr.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=I){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||I),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function ir(t){let e;return nr(t,(t=>e=t))(),e}let lr=!1,ar=Symbol();function sr(t,e,n){const r=n[e]??(n[e]={store:null,source:et(void 0),unsubscribe:I});if(r.store!==t&&!(ar in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=I;else{var o=!0;r.unsubscribe=nr(t,(t=>{o?r.source.v=t:ot(r.source,t)})),o=!1}return t&&ar in n?ir(t):Pe(r.source)}function ur(t,e){return t.set(e),e}function cr(){const t={};return[t,function(){Mt((()=>{for(var e in t)t[e].unsubscribe();$(t,ar,{enumerable:!1,value:!0})}))}]}const dr={get(t,e){if(!t.exclude.includes(e))return Pe(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=hr({get[e](){return t.props[e]}},e,4)),t.special[e](n),lt(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),lt(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 fr(t,e){return new Proxy({props:t,exclude:e,special:{},version:Q(0)},dr)}const vr={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(P(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];P(o)&&(o=o());const i=_(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(P(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=_(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===D||e===L)return!1;for(let n of t.props)if(P(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){P(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function pr(...t){return new Proxy({props:t},vr)}function hr(t,e,n,r){var o,i,l=!!(1&n),a=!H||!!(2&n),s=!!(8&n),u=!!(16&n),c=!1;s?[i,c]=function(t){var e=lr;try{return lr=!1,[t(),lr]}finally{lr=e}}((()=>t[e])):i=t[e];var d,f=D in t||L in t,v=s&&((null==(o=_(t,e))?void 0:o.set)??(f&&e in t&&(n=>t[e]=n)))||void 0,p=r,h=!0,g=!1,m=()=>(g=!0,h&&(h=!1,p=u?Ie(r):r),p);if(void 0===i&&void 0!==r&&(v&&a&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i=m(),v&&v(i)),a)d=()=>{var n=t[e];return void 0===n?m():(h=!0,g=!1,n)};else{var y=(l?xt:$t)((()=>t[e]));y.f|=131072,d=()=>{var t=Pe(y);return void 0!==t&&(p=void 0),void 0===t?p:t}}if(!(4&n))return d;if(v){var b=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!b&&!c||v(e?d():t),t):d()}}var w=!1,x=et(i),$=xt((()=>{var t=d(),e=Pe(x);return w?(w=!1,e):x.v=t}));return l||($.equals=R),function(t,e){if(arguments.length>0){const n=e?Pe($):a&&s?st(t):t;return $.equals(n)||(w=!0,ot(x,n),g&&void 0!==p&&(p=n),Ie((()=>Pe($)))),t}return Pe($)}}function gr(t){var e,n;null===U&&K(),H&&null!==U.l?(e=U,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Pt((()=>{const e=Ie(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&((i=window.__svelte??(window.__svelte={})).v??(i.v=new Set)).add("5"),H=!0;
1
+ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.defineProperty,v=t=>{throw TypeError(t)},p=(t,e,n)=>e.has(t)||v("Cannot "+n),h=(t,e,n)=>(p(t,e,"read from private field"),n?n.call(t):e.get(t)),g=(t,e,n)=>e.has(t)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),m=(t,e,n,r)=>(p(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),y=(t,e,n)=>(p(t,e,"access private method"),n);var b=Array.isArray,w=Array.prototype.indexOf,x=Array.from,$=Object.defineProperty,k=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyDescriptors,C=Object.prototype,S=Array.prototype,M=Object.getPrototypeOf,P=Object.isExtensible;function j(t){return"function"==typeof t}const I=()=>{};function z(t){return t()}function E(t){for(var e=0;e<t.length;e++)t[e]()}const N=256,O=1024,T=2048,A=4096,B=8192,W=16384,D=65536,L=1<<21,q=Symbol("$state"),G=Symbol("legacy props"),F=Symbol("");function R(t){return t===this.v}function H(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function V(t){return!H(t,this.v)}let U=!1;const K=Symbol();function Y(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Z=null;function J(t){Z=t}function X(t,e=!1,n){var r=Z={p:Z,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};U&&!e&&(Z.l={s:null,u:null,r1:[],r2:ot(!1)}),jt((()=>{r.d=!0}))}function Q(t){const e=Z;if(null!==e){const t=e.e;if(null!==t){var n=se,r=ie;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];ue(i.effect),ae(i.reaction),zt(i.fn)}}finally{ue(n),ae(r)}}Z=e.p,e.m=!0}return{}}function tt(){return!U||null!==Z&&null===Z.l}function et(t,e){if("object"!=typeof t||null===t||q in t)return t;const n=M(t);if(n!==C&&n!==S)return t;var r=new Map,o=b(t),i=it(0),l=ie,a=t=>{var e,n=ie;return ae(l),e=t(),ae(n),e};return o&&r.set("length",it(t.length)),new Proxy(t,{defineProperty(t,e,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=r.get(e);return void 0===o?(o=a((()=>it(n.value))),r.set(e,o)):at(o,a((()=>et(n.value)))),!0},deleteProperty(t,e){var n=r.get(e);if(void 0===n)e in t&&r.set(e,a((()=>it(K))));else{if(o&&"string"==typeof e){var l=r.get("length"),s=Number(e);Number.isInteger(s)&&s<l.v&&at(l,s)}at(n,K),nt(i)}return!0},get(e,n,o){var i;if(n===q)return t;var l=r.get(n),s=n in e;if(void 0!==l||s&&!(null==(i=k(e,n))?void 0:i.writable)||(l=a((()=>it(et(s?e[n]:K)))),r.set(n,l)),void 0!==l){var u=ze(l);return u===K?void 0:u}return Reflect.get(e,n,o)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var o=r.get(e);o&&(n.value=ze(o))}else if(void 0===n){var i=r.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==K)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return n},has(t,e){var n;if(e===q)return!0;var o=r.get(e),i=void 0!==o&&o.v!==K||Reflect.has(t,e);return!((void 0!==o||null!==se&&(!i||(null==(n=k(t,e))?void 0:n.writable)))&&(void 0===o&&(o=a((()=>it(i?et(t[e]):K))),r.set(e,o)),ze(o)===K))&&i},set(t,e,n,l){var s,u=r.get(e),c=e in t;if(o&&"length"===e)for(var d=n;d<u.v;d+=1){var f=r.get(d+"");void 0!==f?at(f,K):d in t&&(f=a((()=>it(K))),r.set(d+"",f))}void 0===u?c&&!(null==(s=k(t,e))?void 0:s.writable)||(at(u=a((()=>it(void 0))),a((()=>et(n)))),r.set(e,u)):(c=u.v!==K,at(u,a((()=>et(n)))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(l,n),!c){if(o&&"string"==typeof e){var p=r.get("length"),h=Number(e);Number.isInteger(h)&&h>=p.v&&at(p,h+1)}nt(i)}return!0},ownKeys(t){ze(i);var e=Reflect.ownKeys(t).filter((t=>{var e=r.get(t);return void 0===e||e.v!==K}));for(var[n,o]of r)o.v===K||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function nt(t,e=1){at(t,t.v+e)}const rt=new Map;function ot(t,e){return{f:0,v:t,reactions:null,equals:R,rv:0,wv:0}}function it(t,e){const n=ot(t);return de(n),n}function lt(t,e=!1){var n;const r=ot(t);return e||(r.equals=V),U&&null!==Z&&null!==Z.l&&((n=Z.l).s??(n.s=[])).push(r),r}function at(t,e,n=!1){return null!==ie&&!le&&tt()&&18&ie.f&&!(null==ce?void 0:ce.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),st(t,n?et(e):e)}function st(t,e){if(!t.equals(e)){var n=t.v;ne?rt.set(t,e):rt.set(t,n),t.v=e,t.wv=ye(),ct(t,T),tt()&&null!==se&&se.f&O&&!(96&se.f)&&(null===pe?pe=[t]:pe.push(t))}return e}function ut(t,e=1){var n=ze(t),r=1===e?n++:n--;return at(t,n),r}function ct(t,e){var n=t.reactions;if(null!==n)for(var r=tt(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&T||(r||l!==se)&&(Oe(l,e),1280&a&&(2&a?ct(l,A):je(l)))}}var dt,ft,vt,pt,ht;function gt(t=""){return document.createTextNode(t)}function mt(t){return pt.call(t)}function yt(t){return ht.call(t)}function bt(t,e){return mt(t)}function wt(t,e){var n=mt(t);return n instanceof Comment&&""===n.data?yt(n):n}function xt(t,e=1,n=!1){let r=t;for(;e--;)r=yt(r);return r}function $t(t){var e=2050,n=null!==ie&&2&ie.f?ie:null;return null===se||null!==n&&n.f&N?e|=N:se.f|=1048576,{ctx:Z,deps:null,effects:null,equals:R,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??se}}function kt(t){const e=$t(t);return de(e),e}function _t(t){const e=$t(t);return e.equals=V,e}function Ct(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)Lt(e[n])}}function St(t){var e=function(t){var e,n=se;ue(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{Ct(t),e=$e(t)}finally{ue(n)}return e}(t);Oe(t,(me||t.f&N)&&null!==t.deps?A:O),t.equals(e)||(t.v=e,t.wv=ye())}function Mt(t){null===se&&null===ie&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==ie&&ie.f&N&&null===se&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),ne&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Pt(t,e,n,r=!0){var o,i,l,a=se,s={ctx:Z,deps:null,nodes_start:null,nodes_end:null,f:t|T,first:null,fn:e,last:null,next:null,parent:a,prev:null,teardown:null,transitions:null,wv:0};if(n)try{Ce(s),s.f|=32768}catch(o){throw Lt(s),o}else null!==e&&je(s);if((!n||null!==s.deps||null!==s.first||null!==s.nodes_start||null!==s.teardown||1048704&s.f)&&r&&(null!==a&&(o=s,null===(l=(i=a).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==ie&&2&ie.f)){var u=ie;(u.effects??(u.effects=[])).push(s)}return s}function jt(t){const e=Pt(8,null,!1);return Oe(e,O),e.teardown=t,e}function It(t){if(Mt(),!(null!==se&&32&se.f&&null!==Z)||Z.m)return zt(t);var e=Z;(e.e??(e.e=[])).push({fn:t,effect:se,reaction:ie})}function zt(t){return Pt(4,t,!1)}function Et(t,e){var n=Z,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=Ot((()=>{t(),r.ran||(r.ran=!0,at(n.l.r2,!0),Ee(e))}))}function Nt(){var t=Z;Ot((()=>{if(ze(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&O&&Oe(n,A),be(n)&&Ce(n),e.ran=!1}t.l.r2.v=!1}}))}function Ot(t){return Pt(8,t,!0)}function Tt(t,e=[],n=$t){const r=e.map(n);return At((()=>t(...r.map(ze))))}function At(t,e=0){return Pt(24|e,t,!0)}function Bt(t,e=!0){return Pt(40,t,!0,e)}function Wt(t){var e=t.teardown;if(null!==e){const t=ne,n=ie;re(!0),ae(null);try{e.call(null)}finally{re(t),ae(n)}}}function Dt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;64&n.f?n.parent=null:Lt(n,e),n=r}}function Lt(t,e=!0){var n=!1;if((e||524288&t.f)&&null!==t.nodes_start){for(var r=t.nodes_start,o=t.nodes_end;null!==r;){var i=r===o?null:yt(r);r.remove(),r=i}n=!0}Dt(t,e&&!n),_e(t,0),Oe(t,W);var l=t.transitions;if(null!==l)for(const s of l)s.stop();Wt(t);var a=t.parent;null!==a&&null!==a.first&&qt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function qt(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 Gt(t,e){var n=[];Rt(t,n,!0),Ft(n,(()=>{Lt(t),e&&e()}))}function Ft(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function Rt(t,e,n){if(!(t.f&B)){if(t.f^=B,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;Rt(r,e,!!(r.f&D||32&r.f)&&n),r=o}}}function Ht(t){Vt(t,!0)}function Vt(t,e){if(t.f&B){t.f^=B,t.f&O||(t.f^=O),be(t)&&(Oe(t,T),je(t));for(var n=t.first;null!==n;){var r=n.next;Vt(n,!!(n.f&D||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}let Ut=[],Kt=[];function Yt(){var t=Ut;Ut=[],E(t)}function Zt(t){0===Ut.length&&queueMicrotask(Yt),Ut.push(t)}function Jt(){var t;Ut.length>0&&Yt(),Kt.length>0&&(t=Kt,Kt=[],E(t))}let Xt=!1,Qt=!1,te=null,ee=!1,ne=!1;function re(t){ne=t}let oe=[],ie=null,le=!1;function ae(t){ie=t}let se=null;function ue(t){se=t}let ce=null;function de(t){null!==ie&&ie.f&L&&(null===ce?ce=[t]:ce.push(t))}let fe=null,ve=0,pe=null,he=1,ge=0,me=!1;function ye(){return++he}function be(t){var e,n=t.f;if(n&T)return!0;if(n&A){var r=t.deps,o=!!(n&N);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==se&&!me,u=r.length;if(a||s){var c=t,d=c.parent;for(i=0;i<u;i++)l=r[i],!a&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(c))||(l.reactions??(l.reactions=[])).push(c);a&&(c.f^=512),!s||null===d||d.f&N||(c.f^=N)}for(i=0;i<u;i++)if(be(l=r[i])&&St(l),l.wv>t.wv)return!0}o&&(null===se||me)||Oe(t,O)}return!1}function we(t,e,n,r){if(Xt){if(null===n&&(Xt=!1),!((o=e).f&W||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(Xt=!0),function(t,e){for(var n=e;null!==n;){if(128&n.f)try{return void n.fn(t)}catch{n.f^=128}n=n.parent}throw Xt=!1,t}(t,e);var o}function xe(t,e,n=!0){var r=t.reactions;if(null!==r)for(var o=0;o<r.length;o++){var i=r[o];(null==ce?void 0:ce.includes(t))||(2&i.f?xe(i,e,!1):e===i&&(n?Oe(i,T):i.f&O&&Oe(i,A),je(i)))}}function $e(t){var e,n=fe,r=ve,o=pe,i=ie,l=me,a=ce,s=Z,u=le,c=t.f;fe=null,ve=0,pe=null,me=!!(c&N)&&(le||!ee||null===ie),ie=96&c?null:t,ce=null,J(t.ctx),le=!1,ge++,t.f|=L;try{var d=(0,t.fn)(),f=t.deps;if(null!==fe){var v;if(_e(t,ve),null!==f&&ve>0)for(f.length=ve+fe.length,v=0;v<fe.length;v++)f[ve+v]=fe[v];else t.deps=f=fe;if(!me)for(v=ve;v<f.length;v++)((e=f[v]).reactions??(e.reactions=[])).push(t)}else null!==f&&ve<f.length&&(_e(t,ve),f.length=ve);if(tt()&&null!==pe&&!le&&null!==f&&!(6146&t.f))for(v=0;v<pe.length;v++)xe(pe[v],t);return null!==i&&(ge++,null!==pe&&(null===o?o=pe:o.push(...pe))),d}finally{fe=n,ve=r,pe=o,ie=i,me=l,ce=a,J(s),le=u,t.f^=L}}function ke(t,e){let n=e.reactions;if(null!==n){var r=w.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===fe||!fe.includes(e))&&(Oe(e,A),768&e.f||(e.f^=512),Ct(e),_e(e,0))}function _e(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)ke(t,n[r])}function Ce(t){var e=t.f;if(!(e&W)){Oe(t,O);var n=se,r=Z,o=ee;se=t,ee=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||Lt(e),e=n}}(t):Dt(t),Wt(t);var i=$e(t);t.teardown="function"==typeof i?i:null,t.wv=he,t.deps}catch(l){we(l,t,n,r||t.ctx)}finally{ee=o,se=n}}}function Se(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===te)throw t;we(t,te,null)}}function Me(){var t=ee;try{var e=0;for(ee=!0;oe.length>0;){e++>1e3&&Se();var n=oe,r=n.length;oe=[];for(var o=0;o<r;o++)Pe(Ie(n[o]))}}finally{Qt=!1,ee=t,te=null,rt.clear()}}function Pe(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{be(r)&&(Ce(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?qt(r):r.fn=null))}catch(o){we(o,r,null,r.ctx)}}}function je(t){Qt||(Qt=!0,queueMicrotask(Me));for(var e=te=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&O))return;e.f^=O}}oe.push(e)}function Ie(t){for(var e=[],n=t;null!==n;){var r=n.f,o=!!(96&r);if(!(o&&r&O||r&B)){if(4&r)e.push(n);else if(o)n.f^=O;else{var i=ie;try{ie=n,be(n)&&Ce(n)}catch(s){we(s,n,null,n.ctx)}finally{ie=i}}var l=n.first;if(null!==l){n=l;continue}}var a=n.parent;for(n=n.next;null===n&&null!==a;)n=a.next,a=a.parent}return e}function ze(t){var e=!!(2&t.f);if(null===ie||le){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&N||(n.f^=N)}}else if(!(null==ce?void 0:ce.includes(t))){var o=ie.deps;t.rv<ge&&(t.rv=ge,null===fe&&null!==o&&o[ve]===t?ve++:null===fe?fe=[t]:me&&fe.includes(t)||fe.push(t))}return e&&be(n=t)&&St(n),ne&&rt.has(t)?rt.get(t):t.v}function Ee(t){var e=le;try{return le=!0,t()}finally{le=e}}const Ne=-7169;function Oe(t,e){t.f=t.f&Ne|e}function Te(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(q in t)Ae(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&q in n&&Ae(n)}}function Ae(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{Ae(t[o],e)}catch(n){}const r=M(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=_(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Be(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const We=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function De(t){return We.includes(t)}const Le={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 qe(t){return t=t.toLowerCase(),Le[t]??t}const Ge=["touchstart","touchmove"];function Fe(t){return Ge.includes(t)}function Re(t,e){if(e){const e=document.body;t.autofocus=!0,Zt((()=>{document.activeElement===e&&t.focus()}))}}let He=!1;function Ve(t){var e=ie,n=se;ae(null),ue(null);try{return t()}finally{ae(e),ue(n)}}const Ue=new Set,Ke=new Set;function Ye(t,e,n,r={}){function o(t){if(r.capture||Xe.call(e,t),!t.cancelBubble)return Ve((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?Zt((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Ze(t,e,n,r,o){var i={capture:r,passive:o},l=Ye(t,e,n,i);e!==document.body&&e!==window&&e!==document||jt((()=>{e.removeEventListener(t,l,i)}))}function Je(t){for(var e=0;e<t.length;e++)Ue.add(t[e]);for(var n of Ke)n(t)}function Xe(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,a=0,s=t.__root;if(s){var u=i.indexOf(s);if(-1!==u&&(n===document||n===window))return void(t.__root=n);var c=i.indexOf(n);if(-1===c)return;u<=c&&(a=u)}if((l=i[a]||t.target)!==n){$(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=ie,f=se;ae(null),ue(null);try{for(var v,p=[];null!==l;){var h=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(b(g)){var[m,...y]=g;m.apply(l,[t,...y])}else g.call(l,t)}catch(w){v?p.push(w):v=w}if(t.cancelBubble||h===n||null===h)break;l=h}if(v){for(let t of p)queueMicrotask((()=>{throw t}));throw v}}finally{t.__root=n,delete t.currentTarget,ae(d),ue(f)}}}function Qe(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function tn(t,e){var n=se;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function en(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Qe(i?t:"<!>"+t),r||(n=mt(n)));var e=o||vt?document.importNode(n,!0):n.cloneNode(!0);return r?tn(mt(e),e.lastChild):tn(e,e),e}}function nn(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=mt(Qe(o));r=mt(t)}var e=r.cloneNode(!0);return tn(e,e),e}}function rn(t=""){var e=gt(t+"");return tn(e,e),e}function on(){var t=document.createDocumentFragment(),e=document.createComment(""),n=gt();return t.append(e,n),tn(e,n),t}function ln(t,e){null!==t&&t.before(e)}let an=!0;function sn(t){an=t}function un(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 cn(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===dt){dt=window,ft=document,vt=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;pt=k(e,"firstChild").get,ht=k(e,"nextSibling").get,P(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),P(n)&&(n.__t=void 0)}}();var a=new Set,s=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!a.has(r)){a.add(r);var o=Fe(r);e.addEventListener(r,Xe,{passive:o});var i=dn.get(r);void 0===i?(document.addEventListener(r,Xe,{passive:o}),dn.set(r,1)):dn.set(r,i+1)}}};s(x(Ue)),Ke.add(s);var u=void 0,c=function(t){const e=Pt(64,t,!0);return(t={})=>new Promise((n=>{t.outro?Gt(e,(()=>{Lt(e),n(void 0)})):(Lt(e),n(void 0))}))}((()=>{var c=n??e.appendChild(gt());return Bt((()=>{i&&(X({}),Z.c=i),o&&(r.$$events=o),an=l,u=t(c,r)||{},an=!0,i&&Q()})),()=>{var t;for(var r of a){e.removeEventListener(r,Xe);var o=dn.get(r);0==--o?(document.removeEventListener(r,Xe),dn.delete(r)):dn.set(r,o)}Ke.delete(s),c!==n&&(null==(t=c.parentNode)||t.removeChild(c))}}));return fn.set(u,c),u}(t,e)}const dn=new Map;let fn=new WeakMap;function vn(t,e,[n,r]=[0,0]){var o=t,i=null,l=null,a=K,s=!1;const u=(t,e=!0)=>{s=!0,c(e,t)},c=(t,e)=>{a!==(a=t)&&(a?(i?Ht(i):e&&(i=Bt((()=>e(o)))),l&&Gt(l,(()=>{l=null}))):(l?Ht(l):e&&(l=Bt((()=>e(o,[n+1,r])))),i&&Gt(i,(()=>{i=null}))))};At((()=>{s=!1,e(u),s||c(null,null)}),n>0?D:0)}let pn=null;function hn(t){pn=t}function gn(t,e){return e}function mn(t,e,n,r,o,i=null){var l=t,a={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(gt()));var s=null,u=!1,c=_t((()=>{var t=n();return b(t)?t:null==t?[]:x(t)}));At((()=>{var t=ze(c),d=t.length;u&&0===d||(u=0===d,function(t,e,n,r,o,i,l){var a,s,u,c,d,f,v,p,h,g,m=!!(8&o),y=!!(3&o),b=t.length,w=e.items,$=e.first,k=null,_=[],C=[];if(m)for(g=0;g<b;g+=1)p=i(v=t[g],g),void 0!==(h=w.get(p))&&(null==(a=h.a)||a.measure(),(f??(f=new Set)).add(h));for(g=0;g<b;g+=1)if(p=i(v=t[g],g),void 0!==(h=w.get(p))){if(y&&yn(h,v,g,o),h.e.f&B&&(Ht(h.e),m&&(null==(s=h.a)||s.unfix(),(f??(f=new Set)).delete(h))),h!==$){if(void 0!==d&&d.has(h)){if(_.length<C.length){var S,M=C[0];k=M.prev;var P=_[0],j=_[_.length-1];for(S=0;S<_.length;S+=1)wn(_[S],M,n);for(S=0;S<C.length;S+=1)d.delete(C[S]);xn(e,P.prev,j.next),xn(e,k,P),xn(e,j,M),$=M,k=j,g-=1,_=[],C=[]}else d.delete(h),wn(h,$,n),xn(e,h.prev,h.next),xn(e,h,null===k?e.first:k.next),xn(e,k,h),k=h;continue}for(_=[],C=[];null!==$&&$.k!==p;)$.e.f&B||(d??(d=new Set)).add($),C.push($),$=$.next;if(null===$)continue;h=$}_.push(h),k=h,$=h.next}else k=bn($?$.e.nodes_start:n,e,k,null===k?e.first:k.next,v,p,g,r,o,l),w.set(p,k),_=[],C=[],$=k.next;if(null!==$||void 0!==d){for(var I=void 0===d?[]:x(d);null!==$;)$.e.f&B||I.push($),$=$.next;var z=I.length;if(z>0){var E=4&o&&0===b?n:null;if(m){for(g=0;g<z;g+=1)null==(u=I[g].a)||u.measure();for(g=0;g<z;g+=1)null==(c=I[g].a)||c.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)Rt(e[l].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var s=n.parentNode;s.textContent="",s.append(n),r.clear(),xn(t,e[0].prev,e[i-1].next)}Ft(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),xn(t,o.prev,o.next)),Lt(o.e,!a)}}))}(e,I,E,w)}}m&&Zt((()=>{var t;if(void 0!==f)for(h of f)null==(t=h.a)||t.apply()})),se.first=e.first&&e.first.e,se.last=k&&k.e}(t,a,l,o,e,r,n),null!==i&&(0===d?s?Ht(s):s=Bt((()=>i(l))):null!==s&&Gt(s,(()=>{s=null}))),ze(c))}))}function yn(t,e,n,r){1&r&&st(t.v,e),2&r?st(t.i,n):t.i=n}function bn(t,e,n,r,o,i,l,a,s,u){var c=pn,d=1&s?16&s?ot(o):lt(o):o,f=2&s?ot(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};pn=v;try{return v.e=Bt((()=>a(t,d,f,u)),!1),v.e.prev=n&&n.e,v.e.next=r&&r.e,null===n?e.first=v:(n.next=v,n.e.next=v.e),null!==r&&(r.prev=v,r.e.prev=v.e),v}finally{pn=c}}function wn(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;i!==r;){var l=yt(i);o.before(i),i=l}}function xn(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 $n(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],a=!1;!0===l&&(l=e["default"===n?"children":n],a=!0),void 0===l?null!==o&&o(t):l(t,a?()=>r:r)}function kn(t,e,n){var r,o,i=t;At((()=>{r!==(r=e())&&(o&&(Gt(o),o=null),r&&(o=Bt((()=>n(i,r)))))}),D)}function _n(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=_n(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Cn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=_n(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const Sn=[..." \t\n\r\f \v\ufeff"];function Mn(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 Pn(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function jn(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var a=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 a=l+i;0!==l&&!Sn.includes(r[l-1])||a!==r.length&&!Sn.includes(r[a])?l=a:r=(0===l?"":r.substring(0,l))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==a?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a),t.__className=n}else if(i&&o!==i)for(var s in i){var u=!!i[s];null!=o&&u===!!o[s]||t.classList.toggle(s,u)}return i}function In(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 zn(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,a=!1,s=[];n&&s.push(...Object.keys(n).map(Pn)),r&&s.push(...Object.keys(r).map(Pn));var u=0,c=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(a?"/"===f&&"*"===t[d-1]&&(a=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?a=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!a&&!1===i&&0===l)if(":"===f&&-1===c)c=d;else if(";"===f||d===e-1){if(-1!==c){var v=Pn(t.substring(u,c).trim());s.includes(v)||(";"!==f&&d++,o+=" "+t.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(o+=Mn(n)),r&&(o+=Mn(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)?(In(t,null==n?void 0:n[0],r[0]),In(t,null==n?void 0:n[1],r[1],"important")):In(t,n,r));return r}const En=Symbol("class"),Nn=Symbol("style"),On=Symbol("is custom element"),Tn=Symbol("is html");function An(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Bn(t,e,n,r){var o=Dn(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[F]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&qn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Wn(t,e,n,r,o=!1){var i=Dn(t),l=i[On],a=!i[Tn],s=e||{},u="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=Cn(n.class):(r||n[En])&&(n.class=null),n[Nn]&&(n.style??(n.style=null));var d=qn(t);for(const m in n){let o=n[m];if(u&&"value"===m&&null==o)t.value=t.__value="",s[m]=o;else if("class"!==m)if("style"!==m){var f=s[m];if(o!==f){s[m]=o;var v=m[0]+m[1];if("$$"!==v)if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=De(r);if(Be(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=o)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=o)if(p)t[`__${r}`]=o,Je([r]);else{let o=function(t){s[m].call(this,t)};s[n]=Ye(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m)Bn(t,m,o);else if("autofocus"===m)Re(t,Boolean(o));else if(l||"__value"!==m&&("value"!==m||null==o))if("selected"===m&&u)An(t,o);else{var h=m;a||(h=qe(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=o||l||g)g||d.includes(h)&&(l||"string"!=typeof o)?t[h]=o:"function"!=typeof o&&Bn(t,h,o);else if(i[m]=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(m)}else t.value=t.__value=o}}else zn(t,o,null==e?void 0:e[Nn],n[Nn]),s[m]=o,s[Nn]=n[Nn];else jn(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,o,r,null==e?void 0:e[En],n[En]),s[m]=o,s[En]=n[En]}return s}function Dn(t){return t.__attributes??(t.__attributes={[On]:t.nodeName.includes("-"),[Tn]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var Ln=new Map;function qn(t){var e,n=Ln.get(t.nodeName);if(n)return n;Ln.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var i in e=_(r))e[i].set&&n.push(i);r=M(r)}return n}const Gn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function Fn(){const t=Gn.now();Gn.tasks.forEach((e=>{e.c(t)||(Gn.tasks.delete(e),e.f())})),0!==Gn.tasks.size&&Gn.tick(Fn)}function Rn(t,e){Ve((()=>{t.dispatchEvent(new CustomEvent(e))}))}function Hn(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 Vn(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Hn(t.trim())]=n.trim()}return e}const Un=t=>t;function Kn(t,e,n,r){var o,i,l,a=!!(4&t),s=e.inert,u=e.style.overflow;function c(){var t=ie,i=se;ae(null),ue(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:"both"}))}finally{ae(t),ue(i)}}var d={is_global:a,in(){e.inert=s,Rn(e,"introstart"),i=Yn(e,c(),l,1,(()=>{Rn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=u}))},out(t){e.inert=!0,Rn(e,"outrostart"),l=Yn(e,c(),i,0,(()=>{Rn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},f=se;if((f.transitions??(f.transitions=[])).push(d),an){var v=a;if(!v){for(var p=f.parent;p&&p.f&D;)for(;(p=p.parent)&&!(16&p.f););v=!p||!!(32768&p.f)}v&&zt((()=>{Ee((()=>d.in()))}))}}function Yn(t,e,n,r,o){var i=1===r;if(j(e)){var l,a=!1;return Zt((()=>{if(!a){var s=e({direction:i?"in":"out"});l=Yn(t,s,n,r,o)}})),{abort:()=>{a=!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:I,deactivate:I,reset:I,t:()=>r};const{delay:s=0,css:u,tick:c,easing:d=Un}=e;var f=[];if(i&&void 0===n&&(c&&c(0,1),u)){var v=Vn(u(0,1));f.push(v,v)}var p=()=>1-r,h=t.animate(f,{duration:s});return h.onfinish=()=>{var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,a=e.duration*Math.abs(l),s=[];if(a>0){var f=!1;if(u)for(var v=Math.ceil(a/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),y=Vn(u(m,1-m));s.push(y),f||(f="hidden"===y.overflow)}f&&(t.style.overflow="hidden"),p=()=>{var t=h.currentTime;return i+l*d(t/a)},c&&function(t){let e;0===Gn.tasks.size&&Gn.tick(Fn),new Promise((n=>{Gn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==h.playState)return!1;var t=p();return c(t,1-t),!0}))}(h=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{p=()=>r,null==c||c(r,1-r),o()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=I)},deactivate:()=>{o=I},reset:()=>{0===r&&(null==c||c(1,0))},t:()=>p()}}function Zn(t){var e=t.type;return"number"===e||"range"===e}function Jn(t){return""===t?null:+t}const Xn=class{constructor(o){g(this,r),g(this,t,new WeakMap),g(this,e),g(this,n),m(this,n,o)}observe(i,l){var a=h(this,t).get(i)||new Set;return a.add(l),h(this,t).set(i,a),y(this,r,o).call(this).observe(i,h(this,n)),()=>{var n=h(this,t).get(i);n.delete(l),0===n.size&&(h(this,t).delete(i),h(this,e).unobserve(i))}}};var Qn;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakSet,o=function(){return h(this,e)??m(this,e,new ResizeObserver((e=>{for(var n of e)for(var r of(Xn.entries.set(n.target,n),h(this,t).get(n.target)||[]))r(n)})))},((t,e,n)=>{e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(Xn,"symbol"!=typeof(Qn="entries")?Qn+"":Qn,new WeakMap);var tr=new Xn({box:"border-box"});function er(t,e){return t===e||(null==t?void 0:t[q])===e}function nr(t={},e,n,r){return zt((()=>{var r,o;return Ot((()=>{r=o,o=[],Ee((()=>{t!==n(...o)&&(e(t,...o),r&&er(n(...r),t)&&e(null,...r))}))})),()=>{Zt((()=>{o&&er(n(...o),t)&&e(null,...o)}))}})),t}function rr(t=!1){const e=Z,n=e.l.u;if(!n)return;let r=()=>Te(e.s);if(t){let t=0,n={};const o=$t((()=>{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=()=>ze(o)}var o;n.b.length&&(o=()=>{or(e,r),E(n.b)},Mt(),Ot(o)),It((()=>{const t=Ee((()=>n.m.map(z)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&It((()=>{or(e,r),E(n.a)}))}function or(t,e){if(t.l.s)for(const n of t.l.s)ze(n);e()}function ir(t,e,n){if(null==t)return e(void 0),I;const r=Ee((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const lr=[];function ar(t,e=I){let n=null;const r=new Set;function o(e){if(H(t,e)&&(t=e,n)){const e=!lr.length;for(const n of r)n[1](),lr.push(n,t);if(e){for(let t=0;t<lr.length;t+=2)lr[t][0](lr[t+1]);lr.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=I){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||I),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function sr(t){let e;return ir(t,(t=>e=t))(),e}let ur=!1,cr=Symbol();function dr(t,e,n){const r=n[e]??(n[e]={store:null,source:lt(void 0),unsubscribe:I});if(r.store!==t&&!(cr in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=I;else{var o=!0;r.unsubscribe=ir(t,(t=>{o?r.source.v=t:at(r.source,t)})),o=!1}return t&&cr in n?sr(t):ze(r.source)}function fr(t,e){return t.set(e),e}function vr(){const t={};return[t,function(){jt((()=>{for(var e in t)t[e].unsubscribe();$(t,cr,{enumerable:!1,value:!0})}))}]}const pr={get(t,e){if(!t.exclude.includes(e))return ze(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=br({get[e](){return t.props[e]}},e,4)),t.special[e](n),ut(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),ut(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 hr(t,e){return new Proxy({props:t,exclude:e,special:{},version:ot(0)},pr)}const gr={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(j(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];j(o)&&(o=o());const i=k(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(j(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=k(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===q||e===G)return!1;for(let n of t.props)if(j(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){j(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function mr(...t){return new Proxy({props:t},gr)}function yr(t){var e;return(null==(e=t.ctx)?void 0:e.d)??!1}function br(t,e,n,r){var o,i,l=!!(1&n),a=!U||!!(2&n),s=!!(8&n),u=!!(16&n),c=!1;s?[i,c]=function(t){var e=ur;try{return ur=!1,[t(),ur]}finally{ur=e}}((()=>t[e])):i=t[e];var d,f=q in t||G in t,v=s&&((null==(o=k(t,e))?void 0:o.set)??(f&&e in t&&(n=>t[e]=n)))||void 0,p=r,h=!0,g=!1,m=()=>(g=!0,h&&(h=!1,p=u?Ee(r):r),p);if(void 0===i&&void 0!==r&&(v&&a&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i=m(),v&&v(i)),a)d=()=>{var n=t[e];return void 0===n?m():(h=!0,g=!1,n)};else{var y=(l?$t:_t)((()=>t[e]));y.f|=131072,d=()=>{var t=ze(y);return void 0!==t&&(p=void 0),void 0===t?p:t}}if(!(4&n))return d;if(v){var b=t.$$legacy;return function(t,e){return arguments.length>0?(a&&e&&!b&&!c||v(e?d():t),t):d()}}var w=!1,x=lt(i),$=$t((()=>{var t=d(),e=ze(x);return w?(w=!1,e):x.v=t}));return s&&ze($),l||($.equals=V),function(t,e){if(arguments.length>0){const n=e?ze($):a&&s?et(t):t;if(!$.equals(n)){if(w=!0,at(x,n),g&&void 0!==p&&(p=n),yr($))return t;Ee((()=>ze($)))}return t}return yr($)?$.v:ze($)}}function wr(t){var e,n;null===Z&&Y(),U&&null!==Z.l?(e=Z,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):It((()=>{const e=Ee(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&((i=window.__svelte??(window.__svelte={})).v??(i.v=new Set)).add("5"),U=!0;
2
2
  /**
3
3
  * @license lucide-svelte v0.476.0 - ISC
4
4
  *
@@ -19,5 +19,5 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,a,s,u,c,d,f=Object.de
19
19
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
20
  *
21
21
  */
22
- const mr={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 yr=Qe("<svg><!><!></svg>");function br(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]),r=fr(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);Z(e,!1);let o=hr(e,"name",8,void 0),i=hr(e,"color",8,"currentColor"),l=hr(e,"size",8,24),a=hr(e,"strokeWidth",8,2),s=hr(e,"absoluteStrokeWidth",8,!1),u=hr(e,"iconNode",24,(()=>[]));tr();var c=yr();let d;var f=yt(c);pn(f,1,u,vn,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=en();n=bt(d),r=()=>Pe(e)[0],o=(t,n)=>{let r;Nt((()=>r=Tn(t,r,{...Pe(e)[1]})))},s=null,u=n,c=dn,Ot((()=>{const t=r()||null;if(t!==i){var e=dn;fn(c),a&&(null===t?Lt(a,(()=>{a=null,l=null})):t===l?Ft(a):(Wt(a),on(!1))),t&&t!==l&&(a=Tt((()=>{if(Je(s=document.createElementNS("http://www.w3.org/2000/svg",t),s),o){var e=s.appendChild(ht());o(s,e)}le.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),on(!0),fn(e)}}),W),nn(t,d)})),bn(wt(f),e,"default",{},null),Nt(((t,e)=>d=Tn(c,d,{...mr,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e})),[()=>s()?24*Number(a())/Number(l()):a(),()=>((...t)=>t.filter(((t,e,n)=>Boolean(t)&&n.indexOf(t)===e)).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)],$t),nn(t,c),J()}function wr(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}function xr(t){const e=t-1;return e*e*e+1}function $r(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function _r(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function kr(t,{delay:e=0,duration:n=400,easing:r=$r,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.filter?"":l.filter,u=a*(1-i),[c,d]=_r(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function Cr(t,{delay:e=0,duration:n=400,easing:r=xr,x:o=0,y:i=0,opacity:l=0}={}){const a=getComputedStyle(t),s=+a.opacity,u="none"===a.transform?"":a.transform,c=s*(1-l),[d,f]=_r(o),[v,p]=_r(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*d}${f}, ${(1-t)*v}${p});\n\t\t\topacity: ${s-c*e}`}}function Sr(t,{delay:e=0,duration:n=400,easing:r=xr,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,a="y"===o?"height":"width",s=parseFloat(i[a]),u="y"===o?["top","bottom"]:["left","right"],c=u.map((t=>`${t[0].toUpperCase()}${t.slice(1)}`)),d=parseFloat(i[`padding${c[0]}`]),f=parseFloat(i[`padding${c[1]}`]),v=parseFloat(i[`margin${c[0]}`]),p=parseFloat(i[`margin${c[1]}`]),h=parseFloat(i[`border${c[0]}Width`]),g=parseFloat(i[`border${c[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*l};${a}: ${t*s}px;padding-${u[0]}: ${t*d}px;padding-${u[1]}: ${t*f}px;margin-${u[0]}: ${t*v}px;margin-${u[1]}: ${t*p}px;border-${u[0]}-width: ${t*h}px;border-${u[1]}-width: ${t*g}px;min-${a}: 0`}}function Mr(t,{delay:e=0,duration:n=400,easing:r=xr,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.transform?"":l.transform,u=1-o,c=a*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${s} scale(${1-u*e});\n\t\t\topacity: ${a-c*e}\n\t\t`}}var Pr=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Ir=Xe('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold text-md svelte-1j97rta">More Games</span></p> <div class="bg-background absolute bottom-0 left-0 h-full w-0 transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');Ue(["click"]);var jr=Qe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),zr=Qe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),Er=Qe('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),Nr=Qe('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" 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>');function Or(t,e){let n=hr(e,"type",8,"success");var r=en(),o=bt(r),i=t=>{nn(t,jr())},l=(t,e)=>{var r=t=>{nn(t,zr())},o=(t,e)=>{var r=t=>{nn(t,Er())},o=(t,e)=>{var r=t=>{nn(t,Nr())},o=t=>{};cn(t,(t=>{"warning"===n()?t(r):t(o,!1)}),e)};cn(t,(t=>{"info"===n()?t(r):t(o,!1)}),e)};cn(t,(t=>{"error"===n()?t(r):t(o,!1)}),e)};cn(o,(t=>{"success"===n()?t(i):t(l,!1)})),nn(t,r)}var Tr=Xe('<div class="sonner-loading-bar"></div>'),Ar=Xe('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function Br(...t){return t.filter(Boolean).join(" ")}const Wr="undefined"!=typeof document;function Dr(t){const e=or(t);return{subscribe:e.subscribe,set:function(t){Wr&&e.set(t)},update:function(t){Wr&&e.update(t)}}}let Lr=0;const qr=function(){const t=Dr([]),e=Dr([]);function n(e){t.update((t=>[e,...t]))}function r(e){var r;const{message:o,...i}=e,l="number"==typeof(null==e?void 0:e.id)||e.id&&(null==(r=e.id)?void 0:r.length)>0?e.id:Lr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return ir(t).find((t=>t.id===l))?t.update((t=>t.map((t=>t.id===l?{...t,...e,id:l,title:o,dismissable:a,type:s,updated:!0}:{...t,updated:!1})))):n({...i,id:l,title:o,dismissable:a,type:s}),l}function o(e){if(void 0!==e)return t.update((t=>t.map((t=>t.id===e?{...t,dismiss:!0}:t)))),e;t.update((t=>t.map((t=>({...t,dismiss:!0})))))}return{create:r,addToast:n,dismiss:o,remove:function(e){if(void 0!==e)return t.update((t=>t.filter((t=>t.id!==e)))),e;t.set([])},message:function(t,e){return r({...e,type:"default",message:t})},error:function(t,e){return r({...e,type:"error",message:t})},success:function(t,e){return r({...e,type:"success",message:t})},info:function(t,e){return r({...e,type:"info",message:t})},warning:function(t,e){return r({...e,type:"warning",message:t})},loading:function(t,e){return r({...e,type:"loading",message:t})},promise:function(t,e){if(!e)return;let n;void 0!==e.loading&&(n=r({...e,promise:t,type:"loading",message:e.loading}));const i=t instanceof Promise?t:t();let l=void 0!==n;return i.then((t=>{if(t&&"boolean"==typeof t.ok&&!t.ok){l=!1;const o="function"==typeof e.error?e.error(`HTTP error! status: ${t.status}`):e.error;r({id:n,type:"error",message:o})}else if(void 0!==e.success){l=!1;const o="function"==typeof e.success?e.success(t):e.success;r({id:n,type:"success",message:o})}})).catch((t=>{if(void 0!==e.error){l=!1;const o="function"==typeof e.error?e.error(t):e.error;r({id:n,type:"error",message:o})}})).finally((()=>{var t;l&&(o(n),n=void 0),null==(t=e.finally)||t.call(e)})),n},custom:function(t,e){const n=(null==e?void 0:e.id)||Lr++;return r({component:t,id:n,...e}),n},removeHeight:function(t){e.update((e=>e.filter((e=>e.toastId!==t))))},setHeight:function(t){void 0!==ir(e).find((e=>e.toastId===t.toastId))?e.update((e=>e.map((e=>e.toastId===t.toastId?t:e)))):e.update((e=>[t,...e]))},reset:function(){t.set([]),e.set([])},toasts:t,heights:e}}(),Gr=Object.assign((function(t,e){return qr.create({message:t,...e})}),{success:qr.success,info:qr.info,warning:qr.warning,error:qr.error,custom:qr.custom,message:qr.message,promise:qr.promise,dismiss:qr.dismiss,loading:qr.loading});var Fr=Xe('<button aria-label="Close toast" data-close-button=""><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"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'),Rr=Xe('<div data-icon=""><!> <!></div>'),Hr=Xe('<div data-title=""><!></div>'),Vr=Xe('<div data-description=""><!></div>'),Kr=Xe('<button data-button="" data-cancel=""> </button>'),Ur=Xe('<button data-button=""> </button>'),Yr=Xe('<!> <div data-content=""><!> <!></div> <!> <!>',1),Zr=Xe('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function Jr(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);Z(e,!1);const[r,o]=cr(),i=()=>sr(x,"$heights",r),l=()=>sr(Pe(lt),"$effect",r),a=nt(void 0,!0),s=nt(void 0,!0),u=nt(void 0,!0),c=nt(void 0,!0),d=nt(void 0,!0),f=nt(void 0,!0),v=nt(void 0,!0),p=nt(void 0,!0),h=nt(void 0,!0),g=nt(void 0,!0),m=nt(void 0,!0),y=nt(void 0,!0),b={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:w,heights:x,removeHeight:$,setHeight:_,remove:k}=qr;let C=hr(e,"toast",9),S=hr(e,"index",9),M=hr(e,"expanded",9),P=hr(e,"invert",13),j=hr(e,"position",9),z=hr(e,"visibleToasts",9),E=hr(e,"expandByDefault",9),N=hr(e,"closeButton",9),O=hr(e,"interacting",9),T=hr(e,"cancelButtonStyle",9,""),A=hr(e,"actionButtonStyle",9,""),B=hr(e,"duration",9,4e3),W=hr(e,"descriptionClass",9,""),D=hr(e,"classes",29,(()=>({}))),L=hr(e,"unstyled",9,!1),q=nt(!1,!0),G=nt(!1,!0),F=nt(!1,!0),R=nt(!1,!0),H=nt(0,!0),V=nt(0,!0),K=nt(void 0,!0),U=nt(0,!0),Y=0,X=0,Q=null;function tt(){ot(G,!0),ot(H,Pe(U)),$(C().id),setTimeout((()=>{k(C().id)}),200)}let et=nt(void 0,!0),rt=nt(C().duration||B()||4e3,!0);function it(){Y=(new Date).getTime(),ot(et,setTimeout((()=>{var t,e;null==(e=(t=C()).onAutoClose)||e.call(t,C()),tt()}),Pe(rt)))}let lt=nt(void 0,!0);gr((()=>{ot(q,!0);const t=Pe(K).getBoundingClientRect().height;return ot(V,t),_({toastId:C().id,height:t}),()=>$(C().id)})),jt((()=>Ee(D())),(()=>{D({...b,...D()})})),jt((()=>Ee(S())),(()=>{ot(a,0===S())})),jt((()=>(Ee(S()),Ee(z()))),(()=>{ot(s,S()+1<=z())})),jt((()=>Ee(C())),(()=>{ot(u,C().title)})),jt((()=>Ee(C())),(()=>{ot(c,C().description)})),jt((()=>Ee(C())),(()=>{ot(d,C().type)})),jt((()=>Ee(C())),(()=>{ot(f,C().class||"")})),jt((()=>Ee(C())),(()=>{ot(v,C().descriptionClass||"")})),jt((()=>(i(),Ee(C()))),(()=>{ot(p,i().findIndex((t=>t.toastId===C().id))||0)})),jt((()=>Ee(j())),(()=>{ot(h,j().split("-"))})),jt((()=>(i(),Pe(p))),(()=>{ot(g,i().reduce(((t,e,n)=>n>=Pe(p)?t:t+e.height),0))})),jt((()=>(Ee(P()),Ee(C()))),(()=>{P(C().invert||P())})),jt((()=>Pe(d)),(()=>{ot(m,"loading"===Pe(d))})),jt((()=>(Pe(p),Pe(g))),(()=>{ot(U,Math.round(14*Pe(p)+Pe(g)))})),jt((()=>(Pe(u),Pe(c))),(()=>{Pe(u),Pe(c),async function(){if(!Pe(q))return;let t;await async function(){await Promise.resolve(),function(){for(Yt();ne.length>0;)Jt=!0,ke(),Yt()}()}(),t=M()||E()?1:1-.05*S(),Pe(K).style.setProperty("height","auto");const e=Pe(K).offsetHeight,n=Pe(K).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;Pe(K).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,ot(V,o),_({toastId:C().id,height:o})}()})),jt((()=>(Ee(C()),Pe(et),Ee(B()))),(()=>{C().updated&&(clearTimeout(Pe(et)),ot(rt,C().duration||B()||4e3),it())})),jt((()=>(Ee(C()),Pe(d))),(()=>{ot(y,C().promise&&"loading"===Pe(d)||C().duration===Number.POSITIVE_INFINITY)})),jt((()=>(Pe(y),Ee(M()),Ee(O()),Pe(et))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=I)}(ot(lt,(t=()=>(Pe(y)||(M()||O()?function(){if(X<Y){const t=(new Date).getTime()-Y;ot(rt,Pe(rt)-t)}X=(new Date).getTime()}():it()),()=>clearTimeout(Pe(et))),{subscribe:t})),"$effect",r)})),jt((()=>l()),(()=>{l()})),jt((()=>Ee(C())),(()=>{C().delete&&tt()})),zt(),tr(!0);var at=Zr();let st;On(at,"tabindex",0);var ut=yt(at),ct=t=>{var e=Fr();Nt((t=>{On(e,"data-disabled",Pe(m)),Sn(e,1,t)}),[()=>{var t,e,n;return $n(Br(null==(t=D())?void 0:t.closeButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.closeButton))}],$t),Ke("click",e,(function(...t){var e;null==(e=Pe(m)?void 0:()=>{var t,e;tt(),null==(e=(t=C()).onDismiss)||e.call(t,C())})||e.apply(this,t)})),nn(t,e)};cn(ut,(t=>{N()&&!C().component&&t(ct)}));var dt=wt(ut,2),ft=t=>{var e=en();wn(bt(e),(()=>C().component),((t,e)=>{e(t,pr((()=>C().componentProps),{$$events:{closeToast:tt}}))})),nn(t,e)},vt=t=>{var n=Yr(),r=bt(n),o=t=>{var n=Rr(),r=yt(n),o=t=>{var n=en();bn(bt(n),e,"loading-icon",{},null),nn(t,n)};cn(r,(t=>{!C().promise&&"loading"!==Pe(d)||C().icon||t(o)}));var i=wt(r,2),l=t=>{var e=en();wn(bt(e),(()=>C().icon),((t,e)=>{e(t,{})})),nn(t,e)},a=(t,n)=>{var r=t=>{var n=en();bn(bt(n),e,"success-icon",{},null),nn(t,n)},o=(t,n)=>{var r=t=>{var n=en();bn(bt(n),e,"error-icon",{},null),nn(t,n)},o=(t,n)=>{var r=t=>{var n=en();bn(bt(n),e,"warning-icon",{},null),nn(t,n)},o=(t,n)=>{var r=t=>{var n=en();bn(bt(n),e,"info-icon",{},null),nn(t,n)};cn(t,(t=>{"info"===Pe(d)&&t(r)}),n)};cn(t,(t=>{"warning"===Pe(d)?t(r):t(o,!1)}),n)};cn(t,(t=>{"error"===Pe(d)?t(r):t(o,!1)}),n)};cn(t,(t=>{"success"===Pe(d)?t(r):t(o,!1)}),n)};cn(i,(t=>{C().icon?t(l):t(a,!1)})),nn(t,n)};cn(r,(t=>{("default"!==Pe(d)||C().icon||C().promise)&&t(o)}));var i=wt(r,2),l=yt(i),a=t=>{var e=Hr(),n=yt(e),r=t=>{var e=en();wn(bt(e),(()=>C().title),((t,e)=>{e(t,pr((()=>C().componentProps)))})),nn(t,e)},o=t=>{var e=tn();Nt((()=>ln(e,C().title))),nn(t,e)};cn(n,(t=>{"string"!=typeof C().title?t(r):t(o,!1)})),Nt((t=>Sn(e,1,t)),[()=>{var t,e,n;return $n(Br(null==(t=D())?void 0:t.title,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.title))}],$t),nn(t,e)};cn(l,(t=>{C().title&&t(a)}));var s=wt(l,2),u=t=>{var e=Vr(),n=yt(e),r=t=>{var e=en();wn(bt(e),(()=>C().description),((t,e)=>{e(t,pr((()=>C().componentProps)))})),nn(t,e)},o=t=>{var e=tn();Nt((()=>ln(e,C().description))),nn(t,e)};cn(n,(t=>{"string"!=typeof C().description?t(r):t(o,!1)})),Nt((t=>Sn(e,1,t)),[()=>{var t,e;return $n(Br(W(),Pe(v),null==(t=D())?void 0:t.description,null==(e=C().classes)?void 0:e.description))}],$t),nn(t,e)};cn(s,(t=>{C().description&&t(u)}));var c=wt(i,2),f=t=>{var e=Kr(),n=yt(e);Nt((t=>{Pn(e,T()),Sn(e,1,t),ln(n,C().cancel.label)}),[()=>{var t,e,n;return $n(Br(null==(t=D())?void 0:t.cancelButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.cancelButton))}],$t),Ke("click",e,(()=>{var t;tt(),(null==(t=C().cancel)?void 0:t.onClick)&&C().cancel.onClick()})),nn(t,e)};cn(c,(t=>{C().cancel&&t(f)}));var p=wt(c,2),h=t=>{var e=Ur(),n=yt(e);Nt((t=>{Pn(e,A()),Sn(e,1,t),ln(n,C().action.label)}),[()=>{var t,e,n;return $n(Br(null==(t=D())?void 0:t.actionButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.actionButton))}],$t),Ke("click",e,(t=>{var e;null==(e=C().action)||e.onClick(t),t.defaultPrevented||tt()})),nn(t,e)};cn(p,(t=>{C().action&&t(h)})),nn(t,n)};cn(dt,(t=>{C().component?t(ft):t(vt,!1)})),Qn(at,(t=>ot(K,t)),(()=>Pe(K))),Nt(((t,e,o)=>{var i;On(at,"aria-live",C().important?"assertive":"polite"),Sn(at,1,t),On(at,"data-styled",!(C().component||(null==(i=C())?void 0:i.unstyled)||L())),On(at,"data-mounted",Pe(q)),On(at,"data-promise",e),On(at,"data-removed",Pe(G)),On(at,"data-visible",Pe(s)),On(at,"data-y-position",Pe(h)[0]),On(at,"data-x-position",Pe(h)[1]),On(at,"data-index",S()),On(at,"data-front",Pe(a)),On(at,"data-swiping",Pe(F)),On(at,"data-type",Pe(d)),On(at,"data-invert",P()),On(at,"data-swipe-out",Pe(R)),On(at,"data-expanded",o),st=Pn(at,`${n.style} ${C().style}`,st,{"--index":S(),"--toasts-before":S(),"--z-index":sr(w,"$toasts",r).length-S(),"--offset":`${Pe(G)?Pe(H):Pe(U)}px`,"--initial-height":`${Pe(V)}px`})}),[()=>{var t,e,r,o,i,l;return $n(Br(n.class,Pe(f),null==(t=D())?void 0:t.toast,null==(r=null==(e=C())?void 0:e.classes)?void 0:r.toast,null==(o=D())?void 0:o[Pe(d)],null==(l=null==(i=C())?void 0:i.classes)?void 0:l[Pe(d)]))},()=>Boolean(C().promise),()=>Boolean(M()||E()&&Pe(q))],$t),Ke("pointerdown",at,(function(t){if(Pe(m))return;ot(H,Pe(U));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(ot(F,!0),Q={x:t.clientX,y:t.clientY})})),Ke("pointerup",at,(function(){var t,e,n;if(Pe(R))return;Q=null;const r=Number((null==(t=Pe(K))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return ot(H,Pe(U)),null==(n=(e=C()).onDismiss)||n.call(e,C()),tt(),void ot(R,!0);Pe(K).style.setProperty("--swipe-amount","0px"),ot(F,!1)})),Ke("pointermove",at,(function(t){if(!Q)return;const e=t.clientY-Q.y,n=t.clientX-Q.x,r=("top"===Pe(h)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?Pe(K).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(Q=null)})),nn(t,at),J(),o()}var Xr=Xe("<ol></ol>"),Qr=Xe('<section class="svelte-1fo5d1m"></section>');function to(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]),r=fr(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);Z(e,!1);const[o,i]=cr(),l=()=>sr(C,"$toasts",o),a=nt(),s=nt(),u="dark",c="light";function d(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let f=hr(e,"invert",8,!1),v=hr(e,"theme",8,"light"),p=hr(e,"position",8,"bottom-right"),h=hr(e,"hotkey",24,(()=>["altKey","KeyT"])),g=hr(e,"containerAriaLabel",8,"Notifications"),m=hr(e,"richColors",8,!1),y=hr(e,"expand",8,!1),b=hr(e,"duration",8,4e3),w=hr(e,"visibleToasts",8,3),x=hr(e,"closeButton",8,!1),$=hr(e,"toastOptions",24,(()=>({}))),_=hr(e,"offset",8,null),k=hr(e,"dir",24,d);const{toasts:C,heights:S,reset:M}=qr;let P=nt(!1),I=nt(!1),j=nt("system"!==(O=v())?O:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),z=nt(),E=null,N=!1;var O;function T(t){N&&!t.currentTarget.contains(t.relatedTarget)&&(N=!1,E&&(E.focus({preventScroll:!0}),E=null))}function A(t){N||(N=!0,E=t.relatedTarget)}!function(t){null===U&&K(),gr((()=>()=>Ie(t)))}((()=>{Pe(z)&&E&&(E.focus({preventScroll:!0}),E=null,N=!1)})),gr((()=>{M();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(ot(P,!0),null==(e=Pe(z))||e.focus()),"Escape"!==t.code||document.activeElement!==Pe(z)&&!(null==(n=Pe(z))?void 0:n.contains(document.activeElement))||ot(P,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),jt((()=>(Ee(p()),l())),(()=>{ot(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),jt((()=>Ee(h())),(()=>{ot(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),jt((()=>l()),(()=>{l().length<=1&&ot(P,!1)})),jt((()=>l()),(()=>{const t=l().filter((t=>t.dismiss&&!t.delete));if(t.length>0){const e=l().map((e=>t.find((t=>t.id===e.id))?{...e,delete:!0}:e));C.set(e)}})),jt((()=>Ee(v())),(()=>{if("system"!==v()&&ot(j,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ot(j,u):ot(j,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{ot(j,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),zt(),tr();var B=en(),W=bt(B),D=t=>{var i=Qr();On(i,"tabindex",-1),pn(i,5,(()=>Pe(a)),vn,((t,i,a,s)=>{var u=Xr();let c;pn(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===Pe(i)))),(t=>t.id),((t,n,r,o)=>{const l=$t((()=>{var t;return(null==(t=$())?void 0:t.actionButtonStyle)||""})),a=$t((()=>{var t;return(null==(t=$())?void 0:t.cancelButtonStyle)||""})),s=$t((()=>{var t;return(null==(t=$())?void 0:t.class)||""})),u=$t((()=>{var t;return(null==(t=$())?void 0:t.descriptionClass)||""})),c=$t((()=>$().classes||{})),d=$t((()=>{var t;return(null==(t=$())?void 0:t.duration)??b()})),v=$t((()=>$().unstyled||!1));Jr(t,{get index(){return Pe(r)},get toast(){return Pe(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return Pe(I)},get position(){return Pe(i)},get expandByDefault(){return y()},get expanded(){return Pe(P)},get actionButtonStyle(){return Pe(l)},get cancelButtonStyle(){return Pe(a)},get class(){return Pe(s)},get descriptionClass(){return Pe(u)},get classes(){return Pe(c)},get duration(){return Pe(d)},get unstyled(){return Pe(v)},$$slots:{"loading-icon":(t,r)=>{var o=en();bn(bt(o),e,"loading-icon",{},(t=>{const e=$t((()=>"loading"===Pe(n).type));!function(t,e){Z(e,!1);let n=hr(e,"visible",8);const r=Array(12).fill(0);tr();var o=Ar();pn(yt(o),5,(()=>r),vn,((t,e)=>{nn(t,Tr())})),Nt((()=>On(o,"data-visible",n()))),nn(t,o),J()}(t,{get visible(){return Pe(e)}})})),nn(t,o)},"success-icon":(t,n)=>{var r=en();bn(bt(r),e,"success-icon",{},(t=>{Or(t,{type:"success"})})),nn(t,r)},"error-icon":(t,n)=>{var r=en();bn(bt(r),e,"error-icon",{},(t=>{Or(t,{type:"error"})})),nn(t,r)},"warning-icon":(t,n)=>{var r=en();bn(bt(r),e,"warning-icon",{},(t=>{Or(t,{type:"warning"})})),nn(t,r)},"info-icon":(t,n)=>{var r=en();bn(bt(r),e,"info-icon",{},(t=>{Or(t,{type:"info"})})),nn(t,r)}}})})),Qn(u,(t=>ot(z,t)),(()=>Pe(z))),Nt(((t,e,i)=>{var l;c=Tn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":Pe(j),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r,[jn]:{"--front-toast-height":`${null==(l=sr(S,"$heights",o)[0])?void 0:l.height}px`,"--offset":"number"==typeof _()?`${_()}px`:_()||"32px","--width":"356px","--gap":"14px"}},"svelte-1fo5d1m"),u.dir=u.dir}),[()=>"auto"===k()?d():k(),()=>Pe(i).split("-")[0],()=>Pe(i).split("-")[1]],$t),Ke("blur",u,T),Ke("focus",u,A),Ke("mouseenter",u,(()=>ot(P,!0))),Ke("mousemove",u,(()=>ot(P,!0))),Ke("mouseleave",u,(()=>{Pe(I)||ot(P,!1)})),Ke("pointerdown",u,(()=>ot(I,!0))),Ke("pointerup",u,(()=>ot(I,!1))),nn(t,u)})),Nt((()=>On(i,"aria-label",`${g()} ${Pe(s)}`))),nn(t,i)};cn(W,(t=>{l().length>0&&t(D)})),nn(t,B),J(),i()}const eo=or(!1),no=or("https://sdk.playlight.dev");var ro=(t,e,n,r)=>{var o;Pe(e)&&!Pe(n)||(null==(o=r.onClick)||o.call(r,r.game.id),window.open("https://"+r.game.domain,"_blank","noopener"))},oo=Xe('<div><p class="text-primary font-bold uppercase">New</p></div>'),io=Xe('<video playsinline="" loop preload="auto"></video>',2),lo=Xe('<div class="bg-background/25 text-muted-foreground z-12 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>'),ao=Xe('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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>'),so=Xe('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');function uo(t,e){Z(e,!0);const[n,r]=cr();let o,i=hr(e,"compact",3,!1),l=tt(!1),a=tt(!1),s=tt(void 0),u=tt(!1),c=tt(!1),d=tt(!1),f=tt(!1),v=tt(void 0);function p(){Pe(l)||Pe(f)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(sr(no,"$projectUrl",n)+"/static/sounds/hover-selection.ogg",.25),ot(l,!0),clearTimeout(o),o=setTimeout((()=>ot(a,!0)),300),Pe(s)&&e.game.cover_video_url&&Pe(s).play().catch((t=>console.error("Video play error:",t)))}function h(){Pe(f)||(g(),Pe(s)&&Pe(u)&&Pe(s).pause())}function g(){ot(l,!1),clearTimeout(o),ot(a,!1)}Pt((()=>{ot(f,"ontouchstart"in window)}));var m=so();Ke("touchstart",ct,(()=>ot(f,!0)),void 0,!0),Ke("touchstart",dt,(t=>{Pe(v)&&!Pe(v).contains(t.target)&&g()}),void 0,!0),m.__touchstart=p,m.__click=[ro,f,a,e];var y=yt(m),b=t=>{var e=oo();let n;Nt((t=>n=Sn(e,1,"bg-background absolute top-4 right-4 z-12 px-2 py-0.5 transition-opacity select-none",null,n,t)),[()=>({"opacity-0":Pe(l)})]),nn(t,e)};cn(y,(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(b)}));var w=wt(y,2),x=t=>{var n=io();let r;n.muted=!0,Qn(n,(t=>ot(s,t)),(()=>Pe(s))),Nt((t=>{On(n,"src",e.game.cover_video_url),r=Sn(n,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,t)}),[()=>({"opacity-100":Pe(l)&&Pe(u)&&e.game.cover_video_url})]),Ke("loadeddata",n,(()=>{ot(u,!0)})),nn(t,n)};cn(w,(t=>{e.game.cover_video_url&&t(x)}));var $=wt(w,2);let _;var k=wt($,2),C=t=>{var n=ao(),r=yt(n),o=yt(r),i=yt(o),l=yt(wt(o,2)),a=wt(r,2),s=t=>{var e=lo();!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"info"},(()=>n),{iconNode:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(e),{size:15}),nn(t,e)};cn(a,(t=>{Pe(f)&&t(s)}));var u=wt(a,2);Nt((()=>{ln(i,e.game.name),ln(l,e.game.description||"No description."),Sn(u,1,`fade-mask bg-background/75 pointer-events-none absolute right-0 ${(Pe(f)?"bottom-7":"bottom-0")??""} left-0 h-8`,"svelte-rulnq9")})),Hn(3,n,(()=>Sr)),nn(t,n)};cn(k,(t=>{Pe(l)&&t(C)}));var S=wt(k,2);let M;Qn(m,(t=>ot(v,t)),(()=>Pe(v))),Nt(((t,n)=>{Sn(m,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(Pe(c)?"":"animate-pulse")??""} ${(i()?"min-h-62":"min-h-92")??""}`,"svelte-rulnq9"),On($,"src",e.game.cover_image_url),_=Sn($,1,"prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9",null,_,t),On(S,"src",e.game.logo_url),M=Sn(S,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 z-10 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-rulnq9",null,M,n)}),[()=>({"opacity-100":Pe(c)&&(!Pe(l)||!Pe(u)||!e.game.cover_video_url)}),()=>({"opacity-100":Pe(d)})]),Ke("mouseenter",m,p),Ke("focus",m,p),Ke("mouseleave",m,h),Ke("blur",m,h),Ke("load",$,(()=>{ot(c,!0)})),Ke("load",S,(()=>{ot(d,!0)})),nn(t,m),J(),r()}Ue(["touchstart","click"]);const co=new(s=class{constructor(){g(this,l),this.baseUrl="https://api.playlight.dev/platform",this.cachedCategories=null,this.currentGame=null}async request(t,e={}){try{const n=`${this.baseUrl}${t}`,r=await fetch(n,{...e,headers:{"Content-Type":"application/json",...e.headers}});if(!r.ok){let t;try{t=await r.json()}catch{}finally{if(429!==r.status&&404!==r.status)throw new Error(`API request failed: ${(null==t?void 0:t.error)||(null==t?void 0:t.message)||r.status}`);return 429===r.status?console.warn("Playlight request didn't go through due to rate limiting."):console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.")}}return await r.json()}catch(n){Gr.error("Error: "+n),console.error("Playlight API error:",n)}}async getCategories(){if(this.cachedCategories)return this.cachedCategories;const t=await this.request("/categories");return this.cachedCategories=t,t}async getSuggestions(t=null,e=1){let n="/suggestions";return t&&(n+="/"+t),e&&(n+="?page="+e),n+="&without="+y(this,l,a).call(this),await this.request(n)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+y(this,l,a).call(this);return this.currentGame=await this.request(t),this.currentGame?{...this.currentGame}:void 0}async trackOpen(){const t=y(this,l,a).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=y(this,l,a).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}},l=new WeakSet,a=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},s);function fo(t){const e=t-1;return e*e*e+1}function vo(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}function po(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=fo}=r,a=getComputedStyle(t),s="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,c/=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,p=e.left+e.width*u,h=e.top+e.height*c,g=n.left+n.width*u,m=n.top+n.height*c,y=(p-g)*f,b=(h-m)*v,w=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(y*y+b*b)):i,easing:l,css:(t,e)=>`transform: ${s} translate(${e*y}px, ${e*b}px) scale(${t+e*w}, ${t+e*x});`}}var ho=(t,e,n)=>{ot(e,""),ot(n,!Pe(n))},go=Xe('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),mo=Xe('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),yo=(t,e,n,r)=>{e(n),ot(r,!1)},bo=Xe("<button> </button>"),wo=Xe('<div class="space-y-1 p-1"></div>'),xo=Xe('<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>'),$o=Xe('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group text-background mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 transition hover:rotate-5"><span class="text-background max-w-[40vw] truncate text-2xl font-bold lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function _o(t,e){Z(e,!0);let n,r=hr(e,"categories",19,(()=>[])),o=hr(e,"selectedCategory",15),i=tt(!1),l=xt((()=>o()||(r().length>0?r()[0]:"..."))),a=tt(""),s=tt(void 0),u=xt((()=>Pe(a)?r().filter((t=>t.toLowerCase().includes(Pe(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d,f=tt(st(c[0]));gr((function(){let t;for(t=Math.floor(Math.random()*(null==c?void 0:c.length));t==d;)t=Math.floor(Math.random()*(null==c?void 0:c.length));ot(f,st(c[t])),d=t}));var v=$o();Ke("click",dt,(function(t){Pe(s)&&!Pe(s).contains(t.target)&&n&&!n.contains(t.target)&&ot(i,!1)}));var p=yt(v),h=yt(p),g=yt(h),m=wt(h,2);m.__click=[ho,a,i];var y=yt(m),b=yt(y),w=wt(y,2);const x=xt((()=>Pe(i)?"rotate-180 transform":""));!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(w,{size:25,strokeWidth:3,get class(){return`text-background mt-1 ml-1 ${Pe(x)??""} transition-transform duration-200`}}),Qn(m,(t=>n=t),(()=>n));var $=wt(p,2),_=t=>{var e=xo(),n=yt(e),l=yt(n),c=yt(l);!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(c),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var d=wt(c,2),f=yt(wt(n,2)),v=t=>{nn(t,go())},p=(t,e)=>{var n=t=>{nn(t,mo())},r=t=>{var e=wo();pn(e,28,(()=>Pe(u)),(t=>t),((t,e)=>{var n=bo();n.__click=[yo,o,e,i];var r,l,a,s,u,c,d,f,v=yt(n);Nt((()=>{Sn(n,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=e?"hover:bg-muted-foreground/20":"")??""} ${(o()==e?"text-background bg-white":"text-white")??""}`),ln(v,e)})),r=n,l=()=>po,a=()=>({duration:150}),f=null,(d=dn).a??(d.a={element:r,measure(){s=this.element.getBoundingClientRect()},apply(){if(null==c||c.abort(),u=this.element.getBoundingClientRect(),s.left!==u.left||s.right!==u.right||s.top!==u.top||s.bottom!==u.bottom){const t=l()(this.element,{from:s,to:u},null==a?void 0:a());c=Vn(this.element,t,void 0,1,(()=>{null==c||c.abort(),c=void 0}))}},fix(){if(!r.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(r);if("absolute"!==t&&"fixed"!==t){var o=r.style;f={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=e,o.height=n;var i=r.getBoundingClientRect();if(s.left!==i.left||s.top!==i.top){var l=`translate(${s.left-i.left}px, ${s.top-i.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(f){var t=r.style;t.position=f.position,t.width=f.width,t.height=f.height,t.transform=f.transform}}}),d.a.element=r,nn(t,n)})),nn(t,e)};cn(t,(t=>{0===Pe(u).length?t(n):t(r,!1)}),e)};cn(f,(t=>{0===r().length?t(v):t(p,!1)})),Qn(e,(t=>ot(s,t)),(()=>Pe(s))),function(t,e,n=e){var r=X();(function(t,e,n,r=n){t.addEventListener(e,(()=>Fe(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),Ge||(Ge=!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",(o=>{var i=o?t.defaultValue:t.value;if(i=Kn(t)?Un(i):i,n(i),r&&i!==(i=e())){var l=t.selectionStart,a=t.selectionEnd;t.value=i??"",null!==a&&(t.selectionStart=l,t.selectionEnd=Math.min(a,t.value.length))}})),null==Ie(e)&&t.value&&n(Kn(t)?Un(t.value):t.value),Et((()=>{var n=e();Kn(t)&&n===Un(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(d,(()=>Pe(a)),(t=>ot(a,t))),Hn(3,e,(()=>Cr),(()=>({y:-5,duration:250}))),nn(t,e)};cn($,(t=>{Pe(i)&&t(_)})),Nt((()=>{ln(g,Pe(f)),ln(b,Pe(l))})),Hn(3,v,(()=>Mr),(()=>({duration:600,delay:50,easing:vo,start:.95}))),nn(t,v),J()}Ue(["click"]);var ko=Xe('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></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 min-[1920px]:h-1/4"></div></div></div></div>');function Co(t,e,n,r,o,i){ot(e,!1),ot(n,!0),ot(r,250),ot(o,0),i(250,0,250,((t,e,n)=>{ot(r,t*(1-n)),ot(o,st(n))}))}async function So(t,e,n,r){var o;if(!(null==(o=e.currentGame)?void 0:o.id))return;const i=!Pe(n);ot(n,!Pe(n)),ot(r,Pe(r)+(i?1:-1)),i?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await co.toggleLike(e.currentGame.id,i)||ot(r,Pe(r)+(i?-1:1))}var Mo=Xe('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="text-foreground max-w-2/3 truncate text-lg font-bold"> </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>'),Po=Xe('<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>'),Io=Xe("<!> <!>",1);function jo(t,e){t.target===t.currentTarget&&ur(eo,!1)}Ue(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","click"]);var zo=(t,e)=>{localStorage.getItem("playlight_exit_intent_disabled_by_user")?localStorage.removeItem("playlight_exit_intent_disabled_by_user"):localStorage.setItem("playlight_exit_intent_disabled_by_user",!0),ot(e,!Pe(e))},Eo=Xe('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-sm:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'),No=(t,e)=>ur(eo,!1),Oo=Xe('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),To=Xe('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'),Ao=Xe("<!> <!>",1),Bo=Xe('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'),Wo=Xe('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none ml-2 flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none w-50 max-sm:w-40"> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3.5 sm:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-5 py-6 max-sm:py-1"><!></div> <!> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></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 Do(t,e){Z(e,!0);const[n,r]=cr(),o=()=>sr(eo,"$discoveryOpen",n);let i,l=hr(e,"showIntentToggle",3,!0),a=tt(!0),s=tt(void 0),u=tt(!0),c=tt(!1),d=tt(void 0),f=tt(st([])),v=tt(st([])),p=tt(1),h=tt(!0),g=tt(void 0),m=tt(!1);async function y(){if(!(Pe(u)&&Pe(p)>1||Pe(c)))try{1===Pe(p)?ot(u,!0):ot(c,!0);const t=Pe(m)?null:Pe(s),e=await co.getSuggestions(t,Pe(p)),n=(null==e?void 0:e.games)||[],r=n.filter((t=>!Pe(f).some((e=>e.id===t.id))));ot(f,st([...Pe(f),...r])),n.length<10?!Pe(m)&&Pe(s)?(ot(m,!0),ot(p,1),setTimeout((()=>y()),100)):ot(h,!1):ot(p,Pe(p)+1)}catch(t){console.error(t),Gr.error("Failed to load games: "+t)}finally{ot(u,!1),ot(c,!1),Pe(h)&&Pe(g)&&setTimeout((()=>{const t=Pe(g).getBoundingClientRect();!(t.top>=-200&&t.left>=0&&t.bottom<=window.innerHeight+200&&t.right<=window.innerWidth)||Pe(u)||Pe(c)||y()}),150)}}gr((()=>(ot(a,!Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))),i=new IntersectionObserver((t=>{t[0].isIntersecting&&Pe(h)&&!Pe(u)&&!Pe(c)&&y()}),{rootMargin:"200px"}),()=>null==i?void 0:i.disconnect()))),gr((async()=>{ot(d,st(await co.getCurrentGameInfo())),await async function(){var t,e,n,r,o,i,l;ot(v,st(await co.getCategories())),!Pe(s)&&(null==(t=Pe(v))?void 0:t.length)>0&&ot(s,st((null==(e=Pe(d))?void 0:e.category)&&(null==(r=Pe(v))?void 0:r.includes(null==(n=Pe(d))?void 0:n.category))?null==(o=Pe(d))?void 0:o.category:null==(l=Pe(v))?void 0:l[(null==(i=Pe(v))?void 0:i.length)-1]))}()})),Pt((()=>{Pe(s)&&(ot(f,st([])),ot(p,1),ot(h,!0),ot(m,!1),ot(u,!0),setTimeout((async()=>{await y(),Pe(f).length<10&&await y()}),100))})),Pt((()=>{Pe(g)&&i&&i.observe(Pe(g))}));var b=Wo();Ke("keydown",dt,(t=>{"Escape"==t.key&&ur(eo,!1)})),b.__click=[jo,o];var w=yt(b),x=yt(w),$=yt(wt(x,2)),_=t=>{var e=Eo();e.__click=[zo,a];var n=yt(e),r=yt(n);Nt((()=>ln(r,Pe(a)?"Don't show on exit":"Show on exit again"))),nn(t,e)};cn($,(t=>{l()&&t(_)}));var k=wt($,2);k.__click=[No,o],function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(k),{size:24,strokeWidth:2.5});var C=wt(w,2);_o(yt(C),{get categories(){return Pe(v)},get selectedCategory(){return Pe(s)},set selectedCategory(t){ot(s,st(t))}});var S=wt(C,2);!function(t,e){var n;Z(e,!0);let r=tt(!1),o=tt(!0),i=tt(!1),l=tt(0),a=tt(1),s=tt(!1),u=tt(!1),c=tt(st((null==(n=e.currentGame)?void 0:n.likes)||0)),d=0;function f(t){ot(s,!0),d=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function v(t){if(!Pe(s))return;const e=t.type.includes("touch")?t.touches[0].clientY:t.clientY,n=Math.max(0,e-d);ot(l,st(n)),ot(a,st(Math.max(0,1-n/150))),n>40&&(ot(s,!1),h(Pe(l),250,250,((t,e,n)=>{ot(l,t+(e-t)*n),ot(a,st(Math.max(0,1-1.5*n))),1===n&&(ot(o,!1),ot(i,!0))})))}function p(){Pe(s)&&(ot(s,!1),Pe(l)<40&&h(Pe(l),0,250,((t,e,n)=>{ot(l,t*(1-n)),ot(a,1)})))}function h(t,e,n,r){const o=Date.now();!function i(){const l=Math.min((Date.now()-o)/n,1);r(t,e,l),l<1&&requestAnimationFrame(i)}()}Pt((()=>{var t,n;(null==(t=e.currentGame)?void 0:t.id)&&(ot(u,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),ot(c,st((null==(n=e.currentGame)?void 0:n.likes)||0)))}));var g=Io(),m=bt(g),y=t=>{var n=Mo();n.__mousedown=f,n.__mousemove=v,n.__mouseup=p,n.__touchstart=f,n.__touchmove=v,n.__touchend=p;var o=wt(yt(n),2),i=yt(o);let s;var d=wt(i,2),h=yt(d),g=yt(wt(d,2)),m=yt(g),y=wt(g,2);y.__click=[So,e,u,c];var b=yt(y);const w=xt((()=>Pe(u)?"currentColor":"none"));!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"thumbs-up"},(()=>n),{iconNode:[["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"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(b,{size:18,strokeWidth:2.5,get fill(){return Pe(w)},style:"margin-top: -5px;"}),Nt((t=>{var r,o;Pn(n,`transform: translateY(${Pe(l)??""}px); opacity: ${Pe(a)??""}; cursor: grab;`),On(i,"src",null==(r=e.currentGame)?void 0:r.logo_url),s=Sn(i,1,"bg-muted h-5 w-5 select-none",null,s,t),ln(h,(null==(o=e.currentGame)?void 0:o.name)||"Default name"),ln(m,Pe(c)),Pn(y,`color: ${(Pe(u)?"white !important":"")??""};`),On(y,"aria-label",Pe(u)?"Unlike game":"Like game")}),[()=>({"animate-pulse":!Pe(r)})]),Ke("mouseleave",n,p),Ke("load",i,(()=>{ot(r,!0)})),nn(t,n)};cn(m,(t=>{e.currentGame&&Pe(o)&&t(y)}));var b=wt(m,2),w=t=>{var e=Po(),n=yt(e);n.__mousedown=[Co,i,o,l,a,h],n.__touchstart=[Co,i,o,l,a,h],Hn(3,n,(()=>Cr),(()=>({delay:150,y:30}))),nn(t,e)};cn(b,(t=>{e.currentGame&&Pe(i)&&t(w)})),nn(t,g),J()}(S,{get currentGame(){return Pe(d)}});var M=wt(S,2);M.__click=[jo,o];var P=yt(M),I=t=>{var e=Oo();wr(yt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),nn(t,e)},j=(t,e)=>{var n=t=>{nn(t,To())},r=t=>{var e=Bo(),n=yt(e);pn(n,17,(()=>Pe(f)),vn,((t,e,n)=>{var r=Ao();const o=xt((()=>Pe(f).findIndex((t=>t.category!==Pe(s)))));var i=bt(r),l=t=>{nn(t,ko())};cn(i,(t=>{n==Pe(o)&&t(l)})),uo(wt(i,2),{get game(){return Pe(e)},onClick:()=>co.trackClick(Pe(e).id)}),nn(t,r)}));var r=wt(n,2),o=yt(r),i=t=>{wr(t,{class:"animate-spin opacity-75",size:30,strokeWidth:2.5})};cn(o,(t=>{Pe(c)&&t(i)})),Qn(r,(t=>ot(g,t)),(()=>Pe(g))),nn(t,e)};cn(t,(t=>{0!==Pe(f).length||Pe(u)?t(r,!1):t(n)}),e)};cn(P,(t=>{Pe(u)&&0===Pe(f).length?t(I):t(j,!1)}));var z=wt(M,2);!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"external-link"},(()=>n),{iconNode:[["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"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(wt(yt(z)),{size:14}),Nt((()=>On(x,"src",sr(no,"$projectUrl",n)+"/static/images/logo-white-small.png"))),Hn(3,b,(()=>kr),(()=>({duration:250}))),nn(t,b),J(),r()}Ue(["click"]);var Lo=Xe('<div class="fixed top-0 right-0 left-0 h-4"></div>');Ue(["mouseover"]);var qo=Xe("<!> <!> <!> <!>",1);function Go(t,e){Z(e,!0);const[n,r]=cr(),o=()=>sr(eo,"$discoveryOpen",n),i=()=>sr(e.config,"$config",n);function l(){ur(eo,!0),co.trackOpen()}let a;eo.subscribe((t=>{try{t?(a=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=a}catch(e){console.error("Failed to toggle body overflow style:",e)}}));var s=qo(),u=bt(s);const c=xt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.position})),d=xt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.visible}));!function(t,e){Z(e,!0);let n=hr(e,"position",3,"bottom-right"),r=hr(e,"visible",3,!0);var o=en(),i=bt(o),l=t=>{var r=Ir();r.__click=[Pr,e];var o=yt(r);!function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"gamepad"},(()=>n),{iconNode:[["line",{x1:"6",x2:"10",y1:"12",y2:"12"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14"}],["line",{x1:"15",x2:"15.01",y1:"13",y2:"13"}],["line",{x1:"18",x2:"18.01",y1:"11",y2:"11"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),Nt((()=>Sn(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white text-background z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),Hn(3,r,(()=>kr)),nn(t,r)};cn(i,(t=>{r()&&t(l)})),nn(t,o),J()}(u,{get position(){return Pe(c)},get visible(){return Pe(d)},onClick:l});var f=wt(u,2),v=t=>{const e=xt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled}));Do(t,{get showIntentToggle(){return Pe(e)}})};cn(f,(t=>{o()&&t(v)}));var p=wt(f,2);const h=xt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled}));!function(t,e){Z(e,!0);let n,r,o=hr(e,"enabled",3,!0),i=!1;var l=Lo();Ke("mousemove",ct,(function(t){i||setTimeout((()=>i=!0),250),n.contains(t.target)||(r=Date.now())})),l.__mouseover=function(){o()&&!localStorage.getItem("playlight_exit_intent_disabled_by_user")&&i&&setTimeout((()=>{var t;r<Date.now()-50&&(null==(t=e.onIntent)||t.call(e))}),150)},Qn(l,(t=>n=t),(()=>n)),nn(t,l),J()}(p,{get enabled(){return Pe(h)},onIntent:()=>{o()||l()}}),to(wt(p,2),{}),nn(t,s),J(),r()}const Fo={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0}};let Ro={...Fo};function Ho(t={}){return Ro=Vo(Fo,t),Ro}function Vo(t,e){const n={...t};return Ko(t)&&Ko(e)&&Object.keys(e).forEach((r=>{Ko(e[r])?r in t?n[r]=Vo(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function Ko(t){return t&&"object"==typeof t&&!Array.isArray(t)}var Uo=Xe("<button><!></button>");Ue(["click"]);var Yo=Xe('<div class="flex h-62 w-full items-center justify-center"><!></div>'),Zo=Xe('<div class="snap-center px-2"><!></div>'),Jo=Xe('<!> <div class="bg-background/85 my-auto mr-3 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-xl backdrop-blur-xl"><p class="text-foreground w-full text-center text-lg font-semibold">Fancy more?</p> <!></div>',1),Xo=(t,e,n)=>Pe(e).scrollBy({left:2*-Pe(n),behavior:"smooth"}),Qo=Xe('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-1/2 left-2 z-20 -translate-y-1/2 transform border p-1 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'),ti=(t,e,n)=>Pe(e).scrollBy({left:2*Pe(n),behavior:"smooth"}),ei=Xe('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-1/2 right-2 z-20 -translate-y-1/2 transform border p-1 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'),ni=Xe("<!> <!>",1),ri=Xe('<div class="playlight-sdk-container svelte-hgmfs5"><div class="h-full w-full px-3"><div class="fade-edges-mask no-scrollbar relative flex h-full w-full snap-x gap-2 overflow-x-auto svelte-hgmfs5"><!></div> <!></div></div>');function oi(t,e){Z(e,!0);const[n,r]=cr();let o=tt(!0),i=tt(st([])),l=tt(st([])),a=tt(void 0),s=tt(void 0),u=tt(0),c=tt(!1),d=tt(!0);gr((async()=>{var t,e,n,r;if(ot(l,st(await co.getCategories())),(null==(t=Pe(l))?void 0:t.length)>0){const t=await co.getCurrentGameInfo();ot(a,st((null==t?void 0:t.category)&&(null==(e=Pe(l))?void 0:e.includes(null==t?void 0:t.category))?null==t?void 0:t.category:null==(r=Pe(l))?void 0:r[(null==(n=Pe(l))?void 0:n.length)-1]))}await async function(){try{ot(o,!0);let t=await co.getSuggestions(Pe(a),1),e=(null==t?void 0:t.games)||[];if(e.length<10&&Pe(a)){const t=await co.getSuggestions(null,1),n=((null==t?void 0:t.games)||[]).filter((t=>!e.some((e=>e.id===t.id))));e=[...e,...n]}ot(i,st(e.slice(0,10)))}catch(t){console.error("Failed to load games for widget:",t)}finally{ot(o,!1)}}()}));var f=ri(),v=yt(f),p=yt(v),h=yt(p),g=t=>{var e=Yo();wr(yt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),nn(t,e)},m=t=>{var e=Jo(),n=bt(e);pn(n,17,(()=>Pe(i)),vn,((t,e)=>{var n,r,o,i,l=Zo();uo(yt(l),{get game(){return Pe(e)},compact:!0,onClick:()=>co.trackClick(Pe(e).id)}),n=l,r="clientWidth",o=t=>ot(u,t),i=Jn.observe(n,(()=>o(n[r]))),It((()=>(Ie((()=>o(n[r]))),i))),nn(t,l)}));var r=wt(n,2);(function(t,e){var n=Uo();n.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},function(t,e,...n){var r,o=t,i=I;Ot((()=>{i!==(i=e())&&(r&&(Wt(r),r=null),r=Tt((()=>i(o,...n))))}),W)}(yt(n),(()=>e.children??I)),Nt((()=>Sn(n,1,`bg-foreground hover:bg-background hover:text-primary text-md cursor-pointer px-3 py-2 font-bold uppercase transition $${e.class??""}`))),nn(t,n)})(wt(yt(r),2),{onclick:()=>{ur(eo,!0),co.trackOpen()},children:(t,e)=>{nn(t,tn("See all"))}}),nn(t,e)};cn(h,(t=>{Pe(o)?t(g):t(m,!1)})),Qn(p,(t=>ot(s,t)),(()=>Pe(s)));var y=wt(p,2),b=t=>{var e=ni(),n=bt(e),r=t=>{var e=Qo();e.__click=[Xo,s,u],function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"chevron-left"},(()=>n),{iconNode:[["path",{d:"m15 18-6-6 6-6"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(e),{size:22,strokeWidth:2.25}),Hn(3,e,(()=>kr)),nn(t,e)};cn(n,(t=>{Pe(c)&&t(r)}));var o=wt(n,2),i=t=>{var e=ei();e.__click=[ti,s,u],function(t,e){const n=fr(e,["children","$$slots","$$events","$$legacy"]);br(t,pr({name:"chevron-right"},(()=>n),{iconNode:[["path",{d:"m9 18 6-6-6-6"}]],children:(t,n)=>{var r=en();bn(bt(r),e,"default",{},null),nn(t,r)},$$slots:{default:!0}}))}(yt(e),{size:22,strokeWidth:2.25}),Hn(3,e,(()=>kr)),nn(t,e)};cn(o,(t=>{Pe(d)&&t(i)})),nn(t,e)};cn(y,(t=>{Pe(i).length>0&&t(b)})),Ke("scroll",p,(t=>{ot(c,t.target.scrollLeft>20),ot(d,t.target.scrollLeft<t.target.scrollWidth-t.target.clientWidth-20)})),nn(t,f),J(),r()}function ii(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach((t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",an(oi,{target:t}))}))}catch(t){console.error("Playlight error occurred initializing and mounting carousel widget:",t)}}Ue(["click"]);const li=new(d=class{constructor(){g(this,u),this.container=null,this.isInitialized=!1,this.config=or(null),this.api=co}async init(t={}){return"undefined"==typeof window?console.error("Playlight cannot run on the server, as it depends on browser APIs."):this.isInitialized?(console.warn("Playlight SDK already initialized!"),void(document.getElementById("playlight-sdk-container")||y(this,u,c).call(this))):(this.setConfig(t),y(this,u,c).call(this),ii(),function(){try{new MutationObserver((()=>{ii()})).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Playlight error occurred setting up widget observer:",t)}}(),await this.api.getCurrentGameInfo(),void(this.isInitialized=!0))}setDiscovery(t=!0){this.isInitialized&&(eo.set(t),t&&co.trackOpen())}setConfig(t={}){var e;null==(e=this.config)||e.set(Ho(t))}},u=new WeakSet,c=function(){try{this.container=document.createElement("div"),this.container.id="playlight-sdk-container",this.container.className="playlight-sdk-container",document.body.appendChild(this.container),an(Go,{target:this.container,props:{config:this.config}})}catch(t){console.error("Playlight error occured during mount:",t)}},d);return"undefined"!=typeof window&&(window.playlightSDK=li),li}();
22
+ const xr={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 $r=nn("<svg><!><!></svg>");function kr(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);X(e,!1);let o=br(e,"name",8,void 0),i=br(e,"color",8,"currentColor"),l=br(e,"size",8,24),a=br(e,"strokeWidth",8,2),s=br(e,"absoluteStrokeWidth",8,!1),u=br(e,"iconNode",24,(()=>[]));rr();var c=$r();let d;var f=bt(c);mn(f,1,u,gn,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=on();n=wt(d),r=()=>ze(e)[0],o=(t,n)=>{let r;Tt((()=>r=Wn(t,r,{...ze(e)[1]})))},s=null,u=n,c=pn,At((()=>{const t=r()||null;if(t!==i){var e=pn;hn(c),a&&(null===t?Gt(a,(()=>{a=null,l=null})):t===l?Ht(a):(Lt(a),sn(!1))),t&&t!==l&&(a=Bt((()=>{if(tn(s=document.createElementNS("http://www.w3.org/2000/svg",t),s),o){var e=s.appendChild(gt());o(s,e)}se.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),sn(!0),hn(e)}}),D),ln(t,d)})),$n(xt(f),e,"default",{},null),Tt(((t,e)=>d=Wn(c,d,{...xr,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e})),[()=>s()?24*Number(a())/Number(l()):a(),()=>((...t)=>t.filter(((t,e,n)=>Boolean(t)&&n.indexOf(t)===e)).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)],_t),ln(t,c),Q()}function _r(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}function Cr(t){const e=t-1;return e*e*e+1}function Sr(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Mr(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Pr(t,{delay:e=0,duration:n=400,easing:r=Sr,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.filter?"":l.filter,u=a*(1-i),[c,d]=Mr(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function jr(t,{delay:e=0,duration:n=400,easing:r=Cr,x:o=0,y:i=0,opacity:l=0}={}){const a=getComputedStyle(t),s=+a.opacity,u="none"===a.transform?"":a.transform,c=s*(1-l),[d,f]=Mr(o),[v,p]=Mr(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${u} translate(${(1-t)*d}${f}, ${(1-t)*v}${p});\n\t\t\topacity: ${s-c*e}`}}function Ir(t,{delay:e=0,duration:n=400,easing:r=Cr,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,a="y"===o?"height":"width",s=parseFloat(i[a]),u="y"===o?["top","bottom"]:["left","right"],c=u.map((t=>`${t[0].toUpperCase()}${t.slice(1)}`)),d=parseFloat(i[`padding${c[0]}`]),f=parseFloat(i[`padding${c[1]}`]),v=parseFloat(i[`margin${c[0]}`]),p=parseFloat(i[`margin${c[1]}`]),h=parseFloat(i[`border${c[0]}Width`]),g=parseFloat(i[`border${c[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*l};${a}: ${t*s}px;padding-${u[0]}: ${t*d}px;padding-${u[1]}: ${t*f}px;margin-${u[0]}: ${t*v}px;margin-${u[1]}: ${t*p}px;border-${u[0]}-width: ${t*h}px;border-${u[1]}-width: ${t*g}px;min-${a}: 0`}}function zr(t,{delay:e=0,duration:n=400,easing:r=Cr,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),a=+l.opacity,s="none"===l.transform?"":l.transform,u=1-o,c=a*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${s} scale(${1-u*e});\n\t\t\topacity: ${a-c*e}\n\t\t`}}var Er=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Nr=en('<button aria-label="open the game discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="text-md mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="bg-background absolute bottom-0 left-0 h-full w-0 transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');Je(["click"]);var Or=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),Tr=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),Ar=nn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'),Br=nn('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" 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>');function Wr(t,e){let n=br(e,"type",8,"success");var r=on(),o=wt(r),i=t=>{ln(t,Or())},l=(t,e)=>{var r=t=>{ln(t,Tr())},o=(t,e)=>{var r=t=>{ln(t,Ar())},o=(t,e)=>{var r=t=>{ln(t,Br())},o=t=>{};vn(t,(t=>{"warning"===n()?t(r):t(o,!1)}),e)};vn(t,(t=>{"info"===n()?t(r):t(o,!1)}),e)};vn(t,(t=>{"error"===n()?t(r):t(o,!1)}),e)};vn(o,(t=>{"success"===n()?t(i):t(l,!1)})),ln(t,r)}var Dr=en('<div class="sonner-loading-bar"></div>'),Lr=en('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function qr(...t){return t.filter(Boolean).join(" ")}const Gr="undefined"!=typeof document;function Fr(t){const e=ar(t);return{subscribe:e.subscribe,set:function(t){Gr&&e.set(t)},update:function(t){Gr&&e.update(t)}}}let Rr=0;const Hr=function(){const t=Fr([]),e=Fr([]);function n(e){t.update((t=>[e,...t]))}function r(e){var r;const{message:o,...i}=e,l="number"==typeof(null==e?void 0:e.id)||e.id&&(null==(r=e.id)?void 0:r.length)>0?e.id:Rr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return sr(t).find((t=>t.id===l))?t.update((t=>t.map((t=>t.id===l?{...t,...e,id:l,title:o,dismissable:a,type:s,updated:!0}:{...t,updated:!1})))):n({...i,id:l,title:o,dismissable:a,type:s}),l}function o(e){if(void 0!==e)return t.update((t=>t.map((t=>t.id===e?{...t,dismiss:!0}:t)))),e;t.update((t=>t.map((t=>({...t,dismiss:!0})))))}return{create:r,addToast:n,dismiss:o,remove:function(e){if(void 0!==e)return t.update((t=>t.filter((t=>t.id!==e)))),e;t.set([])},message:function(t,e){return r({...e,type:"default",message:t})},error:function(t,e){return r({...e,type:"error",message:t})},success:function(t,e){return r({...e,type:"success",message:t})},info:function(t,e){return r({...e,type:"info",message:t})},warning:function(t,e){return r({...e,type:"warning",message:t})},loading:function(t,e){return r({...e,type:"loading",message:t})},promise:function(t,e){if(!e)return;let n;void 0!==e.loading&&(n=r({...e,promise:t,type:"loading",message:e.loading}));const i=t instanceof Promise?t:t();let l=void 0!==n;return i.then((t=>{if(t&&"boolean"==typeof t.ok&&!t.ok){l=!1;const o="function"==typeof e.error?e.error(`HTTP error! status: ${t.status}`):e.error;r({id:n,type:"error",message:o})}else if(void 0!==e.success){l=!1;const o="function"==typeof e.success?e.success(t):e.success;r({id:n,type:"success",message:o})}})).catch((t=>{if(void 0!==e.error){l=!1;const o="function"==typeof e.error?e.error(t):e.error;r({id:n,type:"error",message:o})}})).finally((()=>{var t;l&&(o(n),n=void 0),null==(t=e.finally)||t.call(e)})),n},custom:function(t,e){const n=(null==e?void 0:e.id)||Rr++;return r({component:t,id:n,...e}),n},removeHeight:function(t){e.update((e=>e.filter((e=>e.toastId!==t))))},setHeight:function(t){void 0!==sr(e).find((e=>e.toastId===t.toastId))?e.update((e=>e.map((e=>e.toastId===t.toastId?t:e)))):e.update((e=>[t,...e]))},reset:function(){t.set([]),e.set([])},toasts:t,heights:e}}(),Vr=Object.assign((function(t,e){return Hr.create({message:t,...e})}),{success:Hr.success,info:Hr.info,warning:Hr.warning,error:Hr.error,custom:Hr.custom,message:Hr.message,promise:Hr.promise,dismiss:Hr.dismiss,loading:Hr.loading});var Ur=en('<button aria-label="Close toast" data-close-button=""><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"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'),Kr=en('<div data-icon=""><!> <!></div>'),Yr=en('<div data-title=""><!></div>'),Zr=en('<div data-description=""><!></div>'),Jr=en('<button data-button="" data-cancel=""> </button>'),Xr=en('<button data-button=""> </button>'),Qr=en('<!> <div data-content=""><!> <!></div> <!> <!>',1),to=en('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function eo(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);X(e,!1);const[r,o]=vr(),i=()=>dr(x,"$heights",r),l=()=>dr(ze(ot),"$effect",r),a=lt(void 0,!0),s=lt(void 0,!0),u=lt(void 0,!0),c=lt(void 0,!0),d=lt(void 0,!0),f=lt(void 0,!0),v=lt(void 0,!0),p=lt(void 0,!0),h=lt(void 0,!0),g=lt(void 0,!0),m=lt(void 0,!0),y=lt(void 0,!0),b={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:w,heights:x,removeHeight:$,setHeight:k,remove:_}=Hr;let C=br(e,"toast",9),S=br(e,"index",9),M=br(e,"expanded",9),P=br(e,"invert",13),j=br(e,"position",9),z=br(e,"visibleToasts",9),E=br(e,"expandByDefault",9),N=br(e,"closeButton",9),O=br(e,"interacting",9),T=br(e,"cancelButtonStyle",9,""),A=br(e,"actionButtonStyle",9,""),B=br(e,"duration",9,4e3),W=br(e,"descriptionClass",9,""),D=br(e,"classes",29,(()=>({}))),L=br(e,"unstyled",9,!1),q=lt(!1,!0),G=lt(!1,!0),F=lt(!1,!0),R=lt(!1,!0),H=lt(0,!0),V=lt(0,!0),U=lt(void 0,!0),K=lt(0,!0),Y=0,Z=0,J=null;function tt(){at(G,!0),at(H,ze(K)),$(C().id),setTimeout((()=>{_(C().id)}),200)}let et=lt(void 0,!0),nt=lt(C().duration||B()||4e3,!0);function rt(){Y=(new Date).getTime(),at(et,setTimeout((()=>{var t,e;null==(e=(t=C()).onAutoClose)||e.call(t,C()),tt()}),ze(nt)))}let ot=lt(void 0,!0);wr((()=>{at(q,!0);const t=ze(U).getBoundingClientRect().height;return at(V,t),k({toastId:C().id,height:t}),()=>$(C().id)})),Et((()=>Te(D())),(()=>{D({...b,...D()})})),Et((()=>Te(S())),(()=>{at(a,0===S())})),Et((()=>(Te(S()),Te(z()))),(()=>{at(s,S()+1<=z())})),Et((()=>Te(C())),(()=>{at(u,C().title)})),Et((()=>Te(C())),(()=>{at(c,C().description)})),Et((()=>Te(C())),(()=>{at(d,C().type)})),Et((()=>Te(C())),(()=>{at(f,C().class||"")})),Et((()=>Te(C())),(()=>{at(v,C().descriptionClass||"")})),Et((()=>(i(),Te(C()))),(()=>{at(p,i().findIndex((t=>t.toastId===C().id))||0)})),Et((()=>Te(j())),(()=>{at(h,j().split("-"))})),Et((()=>(i(),ze(p))),(()=>{at(g,i().reduce(((t,e,n)=>n>=ze(p)?t:t+e.height),0))})),Et((()=>(Te(P()),Te(C()))),(()=>{P(C().invert||P())})),Et((()=>ze(d)),(()=>{at(m,"loading"===ze(d))})),Et((()=>(ze(p),ze(g))),(()=>{at(K,Math.round(14*ze(p)+ze(g)))})),Et((()=>(ze(u),ze(c))),(()=>{ze(u),ze(c),async function(){if(!ze(q))return;let t;await async function(){await Promise.resolve(),function(){for(Jt();oe.length>0;)Qt=!0,Me(),Jt()}()}(),t=M()||E()?1:1-.05*S(),ze(U).style.setProperty("height","auto");const e=ze(U).offsetHeight,n=ze(U).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;ze(U).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,at(V,o),k({toastId:C().id,height:o})}()})),Et((()=>(Te(C()),ze(et),Te(B()))),(()=>{C().updated&&(clearTimeout(ze(et)),at(nt,C().duration||B()||4e3),rt())})),Et((()=>(Te(C()),ze(d))),(()=>{at(y,C().promise&&"loading"===ze(d)||C().duration===Number.POSITIVE_INFINITY)})),Et((()=>(ze(y),Te(M()),Te(O()),ze(et))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=I)}(at(ot,(t=()=>(ze(y)||(M()||O()?function(){if(Z<Y){const t=(new Date).getTime()-Y;at(nt,ze(nt)-t)}Z=(new Date).getTime()}():rt()),()=>clearTimeout(ze(et))),{subscribe:t})),"$effect",r)})),Et((()=>l()),(()=>{l()})),Et((()=>Te(C())),(()=>{C().delete&&tt()})),Nt(),rr(!0);var it=to();let st;Bn(it,"tabindex",0);var ut=bt(it),ct=t=>{var e=Ur();Tt((t=>{Bn(e,"data-disabled",ze(m)),jn(e,1,t)}),[()=>{var t,e,n;return Cn(qr(null==(t=D())?void 0:t.closeButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.closeButton))}],_t),Ze("click",e,(function(...t){var e;null==(e=ze(m)?void 0:()=>{var t,e;tt(),null==(e=(t=C()).onDismiss)||e.call(t,C())})||e.apply(this,t)})),ln(t,e)};vn(ut,(t=>{N()&&!C().component&&t(ct)}));var dt=xt(ut,2),ft=t=>{var e=on();kn(wt(e),(()=>C().component),((t,e)=>{e(t,mr((()=>C().componentProps),{$$events:{closeToast:tt}}))})),ln(t,e)},vt=t=>{var n=Qr(),r=wt(n),o=t=>{var n=Kr(),r=bt(n),o=t=>{var n=on();$n(wt(n),e,"loading-icon",{},null),ln(t,n)};vn(r,(t=>{!C().promise&&"loading"!==ze(d)||C().icon||t(o)}));var i=xt(r,2),l=t=>{var e=on();kn(wt(e),(()=>C().icon),((t,e)=>{e(t,{})})),ln(t,e)},a=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"success-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"error-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"warning-icon",{},null),ln(t,n)},o=(t,n)=>{var r=t=>{var n=on();$n(wt(n),e,"info-icon",{},null),ln(t,n)};vn(t,(t=>{"info"===ze(d)&&t(r)}),n)};vn(t,(t=>{"warning"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"error"===ze(d)?t(r):t(o,!1)}),n)};vn(t,(t=>{"success"===ze(d)?t(r):t(o,!1)}),n)};vn(i,(t=>{C().icon?t(l):t(a,!1)})),ln(t,n)};vn(r,(t=>{("default"!==ze(d)||C().icon||C().promise)&&t(o)}));var i=xt(r,2),l=bt(i),a=t=>{var e=Yr(),n=bt(e),r=t=>{var e=on();kn(wt(e),(()=>C().title),((t,e)=>{e(t,mr((()=>C().componentProps)))})),ln(t,e)},o=t=>{var e=rn();Tt((()=>un(e,C().title))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().title?t(r):t(o,!1)})),Tt((t=>jn(e,1,t)),[()=>{var t,e,n;return Cn(qr(null==(t=D())?void 0:t.title,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.title))}],_t),ln(t,e)};vn(l,(t=>{C().title&&t(a)}));var s=xt(l,2),u=t=>{var e=Zr(),n=bt(e),r=t=>{var e=on();kn(wt(e),(()=>C().description),((t,e)=>{e(t,mr((()=>C().componentProps)))})),ln(t,e)},o=t=>{var e=rn();Tt((()=>un(e,C().description))),ln(t,e)};vn(n,(t=>{"string"!=typeof C().description?t(r):t(o,!1)})),Tt((t=>jn(e,1,t)),[()=>{var t,e;return Cn(qr(W(),ze(v),null==(t=D())?void 0:t.description,null==(e=C().classes)?void 0:e.description))}],_t),ln(t,e)};vn(s,(t=>{C().description&&t(u)}));var c=xt(i,2),f=t=>{var e=Jr(),n=bt(e);Tt((t=>{zn(e,T()),jn(e,1,t),un(n,C().cancel.label)}),[()=>{var t,e,n;return Cn(qr(null==(t=D())?void 0:t.cancelButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.cancelButton))}],_t),Ze("click",e,(()=>{var t;tt(),(null==(t=C().cancel)?void 0:t.onClick)&&C().cancel.onClick()})),ln(t,e)};vn(c,(t=>{C().cancel&&t(f)}));var p=xt(c,2),h=t=>{var e=Xr(),n=bt(e);Tt((t=>{zn(e,A()),jn(e,1,t),un(n,C().action.label)}),[()=>{var t,e,n;return Cn(qr(null==(t=D())?void 0:t.actionButton,null==(n=null==(e=C())?void 0:e.classes)?void 0:n.actionButton))}],_t),Ze("click",e,(t=>{var e;null==(e=C().action)||e.onClick(t),t.defaultPrevented||tt()})),ln(t,e)};vn(p,(t=>{C().action&&t(h)})),ln(t,n)};vn(dt,(t=>{C().component?t(ft):t(vt,!1)})),nr(it,(t=>at(U,t)),(()=>ze(U))),Tt(((t,e,o)=>{var i;Bn(it,"aria-live",C().important?"assertive":"polite"),jn(it,1,t),Bn(it,"data-styled",!(C().component||(null==(i=C())?void 0:i.unstyled)||L())),Bn(it,"data-mounted",ze(q)),Bn(it,"data-promise",e),Bn(it,"data-removed",ze(G)),Bn(it,"data-visible",ze(s)),Bn(it,"data-y-position",ze(h)[0]),Bn(it,"data-x-position",ze(h)[1]),Bn(it,"data-index",S()),Bn(it,"data-front",ze(a)),Bn(it,"data-swiping",ze(F)),Bn(it,"data-type",ze(d)),Bn(it,"data-invert",P()),Bn(it,"data-swipe-out",ze(R)),Bn(it,"data-expanded",o),st=zn(it,`${n.style} ${C().style}`,st,{"--index":S(),"--toasts-before":S(),"--z-index":dr(w,"$toasts",r).length-S(),"--offset":`${ze(G)?ze(H):ze(K)}px`,"--initial-height":`${ze(V)}px`})}),[()=>{var t,e,r,o,i,l;return Cn(qr(n.class,ze(f),null==(t=D())?void 0:t.toast,null==(r=null==(e=C())?void 0:e.classes)?void 0:r.toast,null==(o=D())?void 0:o[ze(d)],null==(l=null==(i=C())?void 0:i.classes)?void 0:l[ze(d)]))},()=>Boolean(C().promise),()=>Boolean(M()||E()&&ze(q))],_t),Ze("pointerdown",it,(function(t){if(ze(m))return;at(H,ze(K));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(at(F,!0),J={x:t.clientX,y:t.clientY})})),Ze("pointerup",it,(function(){var t,e,n;if(ze(R))return;J=null;const r=Number((null==(t=ze(U))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return at(H,ze(K)),null==(n=(e=C()).onDismiss)||n.call(e,C()),tt(),void at(R,!0);ze(U).style.setProperty("--swipe-amount","0px"),at(F,!1)})),Ze("pointermove",it,(function(t){if(!J)return;const e=t.clientY-J.y,n=t.clientX-J.x,r=("top"===ze(h)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?ze(U).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(J=null)})),ln(t,it),Q(),o()}var no=en("<ol></ol>"),ro=en('<section class="svelte-1fo5d1m"></section>');function oo(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]),r=hr(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);X(e,!1);const[o,i]=vr(),l=()=>dr(C,"$toasts",o),a=lt(),s=lt(),u="dark",c="light";function d(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let f=br(e,"invert",8,!1),v=br(e,"theme",8,"light"),p=br(e,"position",8,"bottom-right"),h=br(e,"hotkey",24,(()=>["altKey","KeyT"])),g=br(e,"containerAriaLabel",8,"Notifications"),m=br(e,"richColors",8,!1),y=br(e,"expand",8,!1),b=br(e,"duration",8,4e3),w=br(e,"visibleToasts",8,3),x=br(e,"closeButton",8,!1),$=br(e,"toastOptions",24,(()=>({}))),k=br(e,"offset",8,null),_=br(e,"dir",24,d);const{toasts:C,heights:S,reset:M}=Hr;let P=lt(!1),j=lt(!1),I=lt("system"!==(O=v())?O:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),z=lt(),E=null,N=!1;var O;function T(t){N&&!t.currentTarget.contains(t.relatedTarget)&&(N=!1,E&&(E.focus({preventScroll:!0}),E=null))}function A(t){N||(N=!0,E=t.relatedTarget)}!function(t){null===Z&&Y(),wr((()=>()=>Ee(t)))}((()=>{ze(z)&&E&&(E.focus({preventScroll:!0}),E=null,N=!1)})),wr((()=>{M();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(at(P,!0),null==(e=ze(z))||e.focus()),"Escape"!==t.code||document.activeElement!==ze(z)&&!(null==(n=ze(z))?void 0:n.contains(document.activeElement))||at(P,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),Et((()=>(Te(p()),l())),(()=>{at(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),Et((()=>Te(h())),(()=>{at(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),Et((()=>l()),(()=>{l().length<=1&&at(P,!1)})),Et((()=>l()),(()=>{const t=l().filter((t=>t.dismiss&&!t.delete));if(t.length>0){const e=l().map((e=>t.find((t=>t.id===e.id))?{...e,delete:!0}:e));C.set(e)}})),Et((()=>Te(v())),(()=>{if("system"!==v()&&at(I,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?at(I,u):at(I,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{at(I,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),Nt(),rr();var B=on(),W=wt(B),D=t=>{var i=ro();Bn(i,"tabindex",-1),mn(i,5,(()=>ze(a)),gn,((t,i,a,s)=>{var u=no();let c;mn(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===ze(i)))),(t=>t.id),((t,n,r,o)=>{const l=_t((()=>{var t;return(null==(t=$())?void 0:t.actionButtonStyle)||""})),a=_t((()=>{var t;return(null==(t=$())?void 0:t.cancelButtonStyle)||""})),s=_t((()=>{var t;return(null==(t=$())?void 0:t.class)||""})),u=_t((()=>{var t;return(null==(t=$())?void 0:t.descriptionClass)||""})),c=_t((()=>$().classes||{})),d=_t((()=>{var t;return(null==(t=$())?void 0:t.duration)??b()})),v=_t((()=>$().unstyled||!1));eo(t,{get index(){return ze(r)},get toast(){return ze(n)},get invert(){return f()},get visibleToasts(){return w()},get closeButton(){return x()},get interacting(){return ze(j)},get position(){return ze(i)},get expandByDefault(){return y()},get expanded(){return ze(P)},get actionButtonStyle(){return ze(l)},get cancelButtonStyle(){return ze(a)},get class(){return ze(s)},get descriptionClass(){return ze(u)},get classes(){return ze(c)},get duration(){return ze(d)},get unstyled(){return ze(v)},$$slots:{"loading-icon":(t,r)=>{var o=on();$n(wt(o),e,"loading-icon",{},(t=>{const e=_t((()=>"loading"===ze(n).type));!function(t,e){X(e,!1);let n=br(e,"visible",8);const r=Array(12).fill(0);rr();var o=Lr();mn(bt(o),5,(()=>r),gn,((t,e)=>{ln(t,Dr())})),Tt((()=>Bn(o,"data-visible",n()))),ln(t,o),Q()}(t,{get visible(){return ze(e)}})})),ln(t,o)},"success-icon":(t,n)=>{var r=on();$n(wt(r),e,"success-icon",{},(t=>{Wr(t,{type:"success"})})),ln(t,r)},"error-icon":(t,n)=>{var r=on();$n(wt(r),e,"error-icon",{},(t=>{Wr(t,{type:"error"})})),ln(t,r)},"warning-icon":(t,n)=>{var r=on();$n(wt(r),e,"warning-icon",{},(t=>{Wr(t,{type:"warning"})})),ln(t,r)},"info-icon":(t,n)=>{var r=on();$n(wt(r),e,"info-icon",{},(t=>{Wr(t,{type:"info"})})),ln(t,r)}}})})),nr(u,(t=>at(z,t)),(()=>ze(z))),Tt(((t,e,i)=>{var l;c=Wn(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":ze(I),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r,[Nn]:{"--front-toast-height":`${null==(l=dr(S,"$heights",o)[0])?void 0:l.height}px`,"--offset":"number"==typeof k()?`${k()}px`:k()||"32px","--width":"356px","--gap":"14px"}},"svelte-1fo5d1m"),u.dir=u.dir}),[()=>"auto"===_()?d():_(),()=>ze(i).split("-")[0],()=>ze(i).split("-")[1]],_t),Ze("blur",u,T),Ze("focus",u,A),Ze("mouseenter",u,(()=>at(P,!0))),Ze("mousemove",u,(()=>at(P,!0))),Ze("mouseleave",u,(()=>{ze(j)||at(P,!1)})),Ze("pointerdown",u,(()=>at(j,!0))),Ze("pointerup",u,(()=>at(j,!1))),ln(t,u)})),Tt((()=>Bn(i,"aria-label",`${g()} ${ze(s)}`))),ln(t,i)};vn(W,(t=>{l().length>0&&t(D)})),ln(t,B),Q(),i()}const io=ar(!1),lo=ar(!1),ao=ar("https://sdk.playlight.dev"),so=new(s=class{constructor(){g(this,l),this.baseUrl="https://api.playlight.dev/platform",this.cachedCategories=null,this.currentGame=null}async request(t,e={}){try{const n=`${this.baseUrl}${t}`,r=await fetch(n,{...e,headers:{"Content-Type":"application/json",...e.headers}});if(!r.ok){let t;try{t=await r.json()}catch{}finally{if(429!==r.status&&404!==r.status)throw new Error(`API request failed: ${(null==t?void 0:t.error)||(null==t?void 0:t.message)||r.status}`);return 429===r.status?console.warn("Playlight request didn't go through due to rate limiting."):console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.")}}return await r.json()}catch(n){Vr.error("Error: "+n),console.error("Playlight API error:",n)}}async getCategories(){if(this.cachedCategories)return this.cachedCategories;const t=await this.request("/categories");return this.cachedCategories=t,t}async getSuggestions(t=null,e=1){let n="/suggestions";return t&&(n+="/"+t),e&&(n+="?page="+e),n+="&without="+y(this,l,a).call(this),await this.request(n)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+y(this,l,a).call(this);return this.currentGame=await this.request(t),this.currentGame?{...this.currentGame}:void 0}async trackOpen(){const t=y(this,l,a).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=y(this,l,a).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}},l=new WeakSet,a=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},s);var uo=(t,e,n,r)=>{ze(e)&&!ze(n)||(so.trackClick(r.game.id),window.open("https://"+r.game.domain+"?utm_source=playlight","_blank","noopener"))},co=en('<div><p class="text-primary font-bold uppercase">New</p></div>'),fo=en('<video playsinline="" loop preload="auto"></video>',2),vo=en('<div class="bg-background/25 text-muted-foreground z-12 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>'),po=en('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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>'),ho=en('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');function go(t,e){X(e,!0);const[n,r]=vr();let o,i=br(e,"compact",3,!1),l=it(!1),a=it(!1),s=it(void 0),u=it(!1),c=it(!1),d=it(!1),f=it(!1),v=it(void 0);function p(){ze(l)||ze(f)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(dr(ao,"$projectUrl",n)+"/static/sounds/hover-selection.ogg",.25),at(l,!0),clearTimeout(o),o=setTimeout((()=>at(a,!0)),300),ze(s)&&e.game.cover_video_url&&ze(s).play().catch((t=>console.error("Video play error:",t)))}function h(){ze(f)||(g(),ze(s)&&ze(u)&&ze(s).pause())}function g(){at(l,!1),clearTimeout(o),at(a,!1)}It((()=>{at(f,"ontouchstart"in window)}));var m=ho();Ze("touchstart",dt,(()=>at(f,!0)),void 0,!0),Ze("touchstart",ft,(t=>{ze(v)&&!ze(v).contains(t.target)&&g()}),void 0,!0),m.__touchstart=p,m.__click=[uo,f,a,e];var y=bt(m),b=t=>{var e=co();let n;Tt((t=>n=jn(e,1,"bg-background absolute top-4 right-4 z-12 px-2 py-0.5 transition-opacity select-none",null,n,t)),[()=>({"opacity-0":ze(l)})]),ln(t,e)};vn(y,(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(b)}));var w=xt(y,2),x=t=>{var n=fo();let r;n.muted=!0,nr(n,(t=>at(s,t)),(()=>ze(s))),Tt((t=>{Bn(n,"src",e.game.cover_video_url),r=jn(n,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,t)}),[()=>({"opacity-100":ze(l)&&ze(u)&&e.game.cover_video_url})]),Ze("loadeddata",n,(()=>{at(u,!0)})),ln(t,n)};vn(w,(t=>{e.game.cover_video_url&&t(x)}));var $=xt(w,2);let k;var _=xt($,2),C=t=>{var n=po(),r=bt(n),o=bt(r),i=bt(o),l=bt(xt(o,2)),a=xt(r,2),s=t=>{var e=vo();!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"info"},(()=>n),{iconNode:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:15}),ln(t,e)};vn(a,(t=>{ze(f)&&t(s)}));var u=xt(a,2);Tt((()=>{un(i,e.game.name),un(l,e.game.description||"No description."),jn(u,1,`fade-mask bg-background/75 pointer-events-none absolute right-0 ${(ze(f)?"bottom-7":"bottom-0")??""} left-0 h-8`,"svelte-rulnq9")})),Kn(3,n,(()=>Ir)),ln(t,n)};vn(_,(t=>{ze(l)&&t(C)}));var S=xt(_,2);let M;nr(m,(t=>at(v,t)),(()=>ze(v))),Tt(((t,n)=>{jn(m,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(ze(c)?"":"animate-pulse")??""} ${(i()?"min-h-62":"min-h-92")??""}`,"svelte-rulnq9"),Bn($,"src",e.game.cover_image_url),k=jn($,1,"prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9",null,k,t),Bn(S,"src",e.game.logo_url),M=jn(S,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 z-10 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-rulnq9",null,M,n)}),[()=>({"opacity-100":ze(c)&&(!ze(l)||!ze(u)||!e.game.cover_video_url)}),()=>({"opacity-100":ze(d)})]),Ze("mouseenter",m,p),Ze("focus",m,p),Ze("mouseleave",m,h),Ze("blur",m,h),Ze("load",$,(()=>{at(c,!0)})),Ze("load",S,(()=>{at(d,!0)})),ln(t,m),Q(),r()}function mo(t){const e=t-1;return e*e*e+1}function yo(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}function bo(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=mo}=r,a=getComputedStyle(t),s="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=t.clientWidth,c/=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,p=e.left+e.width*u,h=e.top+e.height*c,g=n.left+n.width*u,m=n.top+n.height*c,y=(p-g)*f,b=(h-m)*v,w=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(y*y+b*b)):i,easing:l,css:(t,e)=>`transform: ${s} translate(${e*y}px, ${e*b}px) scale(${t+e*w}, ${t+e*x});`}}Je(["touchstart","click"]);var wo=(t,e,n)=>{at(e,""),at(n,!ze(n))},xo=en('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),$o=en('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),ko=(t,e,n,r)=>{e(n),at(r,!1)},_o=en("<button> </button>"),Co=en('<div class="space-y-1 p-1"></div>'),So=en('<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>'),Mo=en('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group text-background mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 transition hover:rotate-5"><span class="text-background max-w-[40vw] truncate text-2xl font-bold lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Po(t,e){X(e,!0);let n,r=br(e,"categories",19,(()=>[])),o=br(e,"selectedCategory",15),i=it(!1),l=kt((()=>o()||(r().length>0?r()[0]:"..."))),a=it(""),s=it(void 0),u=kt((()=>ze(a)?r().filter((t=>t.toLowerCase().includes(ze(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d,f=it(et(c[0]));wr((function(){let t;for(t=Math.floor(Math.random()*(null==c?void 0:c.length));t==d;)t=Math.floor(Math.random()*(null==c?void 0:c.length));at(f,c[t],!0),d=t}));var v=Mo();Ze("click",ft,(function(t){ze(s)&&!ze(s).contains(t.target)&&n&&!n.contains(t.target)&&at(i,!1)}));var p=bt(v),h=bt(p),g=bt(h),m=xt(h,2);m.__click=[wo,a,i];var y=bt(m),b=bt(y),w=xt(y,2);const x=kt((()=>ze(i)?"rotate-180 transform":""));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(w,{size:25,strokeWidth:3,get class(){return`text-background mt-1 ml-1 ${ze(x)??""} transition-transform duration-200`}}),nr(m,(t=>n=t),(()=>n));var $=xt(p,2),k=t=>{var e=So(),n=bt(e),l=bt(n),c=bt(l);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(c),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var d=xt(c,2),f=bt(xt(n,2)),v=t=>{ln(t,xo())},p=(t,e)=>{var n=t=>{ln(t,$o())},r=t=>{var e=Co();mn(e,28,(()=>ze(u)),(t=>t),((t,e)=>{var n=_o();n.__click=[ko,o,e,i];var r,l,a,s,u,c,d,f,v=bt(n);Tt((()=>{jn(n,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=e?"hover:bg-muted-foreground/20":"")??""} ${(o()==e?"text-background bg-white":"text-white")??""}`),un(v,e)})),r=n,l=()=>bo,a=()=>({duration:150}),f=null,(d=pn).a??(d.a={element:r,measure(){s=this.element.getBoundingClientRect()},apply(){if(null==c||c.abort(),u=this.element.getBoundingClientRect(),s.left!==u.left||s.right!==u.right||s.top!==u.top||s.bottom!==u.bottom){const t=l()(this.element,{from:s,to:u},null==a?void 0:a());c=Yn(this.element,t,void 0,1,(()=>{null==c||c.abort(),c=void 0}))}},fix(){if(!r.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(r);if("absolute"!==t&&"fixed"!==t){var o=r.style;f={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=e,o.height=n;var i=r.getBoundingClientRect();if(s.left!==i.left||s.top!==i.top){var l=`translate(${s.left-i.left}px, ${s.top-i.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(f){var t=r.style;t.position=f.position,t.width=f.width,t.height=f.height,t.transform=f.transform}}}),d.a.element=r,ln(t,n)})),ln(t,e)};vn(t,(t=>{0===ze(u).length?t(n):t(r,!1)}),e)};vn(f,(t=>{0===r().length?t(v):t(p,!1)})),nr(e,(t=>at(s,t)),(()=>ze(s))),function(t,e,n=e){var r=tt();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ve(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),He||(He=!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",(o=>{var i=o?t.defaultValue:t.value;if(i=Zn(t)?Jn(i):i,n(i),r&&i!==(i=e())){var l=t.selectionStart,a=t.selectionEnd;t.value=i??"",null!==a&&(t.selectionStart=l,t.selectionEnd=Math.min(a,t.value.length))}})),null==Ee(e)&&t.value&&n(Zn(t)?Jn(t.value):t.value),Ot((()=>{var n=e();Zn(t)&&n===Jn(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(d,(()=>ze(a)),(t=>at(a,t))),Kn(3,e,(()=>jr),(()=>({y:-5,duration:250}))),ln(t,e)};vn($,(t=>{ze(i)&&t(k)})),Tt((()=>{un(g,ze(f)),un(b,ze(l))})),Kn(3,v,(()=>zr),(()=>({duration:600,delay:50,easing:yo,start:.95}))),ln(t,v),Q()}Je(["click"]);var jo=en('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></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 min-[1920px]:h-1/4"></div></div></div></div>');function Io(t,e,n,r,o,i){at(e,!1),at(n,!0),at(r,250),at(o,0),i(250,0,250,((t,e,n)=>{at(r,t*(1-n)),at(o,n,!0)}))}async function zo(t,e,n,r){var o;if(!(null==(o=e.currentGame)?void 0:o.id))return;const i=!ze(n);at(n,!ze(n)),at(r,ze(r)+(i?1:-1)),i?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await so.toggleLike(e.currentGame.id,i)||at(r,ze(r)+(i?-1:1))}var Eo=en('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="logo"> <p class="text-foreground max-w-2/3 truncate text-lg font-bold"> </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>'),No=en('<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>'),Oo=en("<!> <!>",1);function To(t,e){t.target===t.currentTarget&&fr(io,!1)}Je(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","click"]);var Ao=(t,e,n)=>{fr(lo,!0),fr(io,!1)},Bo=en('<div><button class="bg-background/50 text-primary cursor-pointer truncate p-1 px-2 text-sm font-normal text-nowrap opacity-50 transition hover:opacity-25 max-sm:hidden">Don\'t show on exit</button></div>'),Wo=(t,e)=>fr(io,!1),Do=en('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Lo=en('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'),qo=en("<!> <!>",1),Go=en('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'),Fo=en('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none ml-2 flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none w-50 max-sm:w-40"> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3.5 sm:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-5 py-6 max-sm:py-1"><!></div> <!> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></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 Ro(t,e){X(e,!0);const[n,r]=vr(),o=()=>dr(io,"$discoveryOpen",n),i=()=>dr(lo,"$exitIntentDisabledByUser",n);let l,a=br(e,"showIntentToggle",3,!0),s=it(void 0),u=it(!0),c=it(!1),d=it(void 0),f=it(et([])),v=it(et([])),p=it(1),h=it(!0),g=it(void 0),m=it(!1);async function y(){if(!(ze(u)&&ze(p)>1||ze(c)))try{1===ze(p)?at(u,!0):at(c,!0);const t=ze(m)?null:ze(s),e=await so.getSuggestions(t,ze(p)),n=(null==e?void 0:e.games)||[],r=n.filter((t=>!ze(f).some((e=>e.id===t.id))));at(f,[...ze(f),...r],!0),n.length<10?!ze(m)&&ze(s)?(at(m,!0),at(p,1),setTimeout((()=>y()),100)):at(h,!1):at(p,ze(p)+1)}catch(t){console.error(t),Vr.error("Failed to load games: "+t)}finally{at(u,!1),at(c,!1),ze(h)&&ze(g)&&setTimeout((()=>{const t=ze(g).getBoundingClientRect();!(t.top>=-200&&t.left>=0&&t.bottom<=window.innerHeight+200&&t.right<=window.innerWidth)||ze(u)||ze(c)||y()}),150)}}wr((()=>(l=new IntersectionObserver((t=>{t[0].isIntersecting&&ze(h)&&!ze(u)&&!ze(c)&&y()}),{rootMargin:"200px"}),()=>null==l?void 0:l.disconnect()))),wr((async()=>{at(d,await so.getCurrentGameInfo(),!0),await async function(){var t,e,n,r,o,i,l;at(v,await so.getCategories(),!0),!ze(s)&&(null==(t=ze(v))?void 0:t.length)>0&&at(s,(null==(e=ze(d))?void 0:e.category)&&(null==(r=ze(v))?void 0:r.includes(null==(n=ze(d))?void 0:n.category))?null==(o=ze(d))?void 0:o.category:null==(l=ze(v))?void 0:l[(null==(i=ze(v))?void 0:i.length)-1],!0)}()})),It((()=>{ze(s)&&(at(f,[],!0),at(p,1),at(h,!0),at(m,!1),at(u,!0),setTimeout((async()=>{await y(),ze(f).length<10&&await y()}),100))})),It((()=>{ze(g)&&l&&l.observe(ze(g))}));var b=Fo();Ze("keydown",ft,(t=>{"Escape"==t.key&&fr(io,!1)})),b.__click=[To,o];var w=bt(b),x=bt(w),$=bt(xt(x,2)),k=t=>{var e=Bo();bt(e).__click=[Ao,i,o],Kn(3,e,(()=>Pr)),ln(t,e)};vn($,(t=>{a()&&!i()&&t(k)}));var _=xt($,2);_.__click=[Wo,o],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(_),{size:24,strokeWidth:2.5});var C=xt(w,2);Po(bt(C),{get categories(){return ze(v)},get selectedCategory(){return ze(s)},set selectedCategory(t){at(s,t,!0)}});var S=xt(C,2);!function(t,e){var n;X(e,!0);let r=it(!1),o=it(!0),i=it(!1),l=it(0),a=it(1),s=it(!1),u=it(!1),c=it(et((null==(n=e.currentGame)?void 0:n.likes)||0)),d=0;function f(t){at(s,!0),d=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function v(t){if(!ze(s))return;const e=t.type.includes("touch")?t.touches[0].clientY:t.clientY,n=Math.max(0,e-d);at(l,n,!0),at(a,Math.max(0,1-n/150),!0),n>40&&(at(s,!1),h(ze(l),250,250,((t,e,n)=>{at(l,t+(e-t)*n),at(a,Math.max(0,1-1.5*n),!0),1===n&&(at(o,!1),at(i,!0))})))}function p(){ze(s)&&(at(s,!1),ze(l)<40&&h(ze(l),0,250,((t,e,n)=>{at(l,t*(1-n)),at(a,1)})))}function h(t,e,n,r){const o=Date.now();!function i(){const l=Math.min((Date.now()-o)/n,1);r(t,e,l),l<1&&requestAnimationFrame(i)}()}It((()=>{var t,n;(null==(t=e.currentGame)?void 0:t.id)&&(at(u,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),at(c,(null==(n=e.currentGame)?void 0:n.likes)||0,!0))}));var g=Oo(),m=wt(g),y=t=>{var n=Eo();n.__mousedown=f,n.__mousemove=v,n.__mouseup=p,n.__touchstart=f,n.__touchmove=v,n.__touchend=p;var o=xt(bt(n),2),i=bt(o);let s;var d=xt(i,2),h=bt(d),g=bt(xt(d,2)),m=bt(g),y=xt(g,2);y.__click=[zo,e,u,c];var b=bt(y);const w=kt((()=>ze(u)?"currentColor":"none"));!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"thumbs-up"},(()=>n),{iconNode:[["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"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(b,{size:18,strokeWidth:2.5,get fill(){return ze(w)},style:"margin-top: -5px;"}),Tt((t=>{var r,o;zn(n,`transform: translateY(${ze(l)??""}px); opacity: ${ze(a)??""}; cursor: grab;`),Bn(i,"src",null==(r=e.currentGame)?void 0:r.logo_url),s=jn(i,1,"bg-muted h-5 w-5 select-none",null,s,t),un(h,(null==(o=e.currentGame)?void 0:o.name)||"Default name"),un(m,ze(c)),zn(y,`color: ${(ze(u)?"white !important":"")??""};`),Bn(y,"aria-label",ze(u)?"Unlike game":"Like game")}),[()=>({"animate-pulse":!ze(r)})]),Ze("mouseleave",n,p),Ze("load",i,(()=>{at(r,!0)})),ln(t,n)};vn(m,(t=>{e.currentGame&&ze(o)&&t(y)}));var b=xt(m,2),w=t=>{var e=No(),n=bt(e);n.__mousedown=[Io,i,o,l,a,h],n.__touchstart=[Io,i,o,l,a,h],Kn(3,n,(()=>jr),(()=>({delay:150,y:30}))),ln(t,e)};vn(b,(t=>{e.currentGame&&ze(i)&&t(w)})),ln(t,g),Q()}(S,{get currentGame(){return ze(d)}});var M=xt(S,2);M.__click=[To,o];var P=bt(M),j=t=>{var e=Do();_r(bt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),ln(t,e)},I=(t,e)=>{var n=t=>{ln(t,Lo())},r=t=>{var e=Go(),n=bt(e);mn(n,17,(()=>ze(f)),gn,((t,e,n)=>{var r=qo();const o=kt((()=>ze(f).findIndex((t=>t.category!==ze(s)))));var i=wt(r),l=t=>{ln(t,jo())};vn(i,(t=>{n==ze(o)&&t(l)})),go(xt(i,2),{get game(){return ze(e)}}),ln(t,r)}));var r=xt(n,2),o=bt(r),i=t=>{_r(t,{class:"animate-spin opacity-75",size:30,strokeWidth:2.5})};vn(o,(t=>{ze(c)&&t(i)})),nr(r,(t=>at(g,t)),(()=>ze(g))),ln(t,e)};vn(t,(t=>{0!==ze(f).length||ze(u)?t(r,!1):t(n)}),e)};vn(P,(t=>{ze(u)&&0===ze(f).length?t(j):t(I,!1)}));var z=xt(M,2);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"external-link"},(()=>n),{iconNode:[["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"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(xt(bt(z)),{size:14}),Tt((()=>Bn(x,"src",dr(ao,"$projectUrl",n)+"/static/images/logo-white-small.png"))),Kn(3,b,(()=>Pr),(()=>({duration:250}))),ln(t,b),Q(),r()}Je(["click"]);var Ho=en('<div class="fixed top-0 right-0 left-0 h-4"></div>');Je(["mouseover"]);var Vo=en("<!> <!> <!> <!>",1);function Uo(t,e){X(e,!0);const[n,r]=vr(),o=()=>dr(io,"$discoveryOpen",n),i=()=>dr(e.config,"$config",n);function l(){fr(io,!0),so.trackOpen()}let a;io.subscribe((t=>{try{t?(a=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=a}catch(e){console.error("Failed to toggle body overflow style:",e)}}));var s=Vo(),u=wt(s);const c=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.position})),d=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.button)?void 0:e.visible}));!function(t,e){X(e,!0);let n=br(e,"position",3,"bottom-right"),r=br(e,"visible",3,!0);var o=on(),i=wt(o),l=t=>{var r=Nr();r.__click=[Er,e];var o=bt(r);!function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"gamepad"},(()=>n),{iconNode:[["line",{x1:"6",x2:"10",y1:"12",y2:"12"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14"}],["line",{x1:"15",x2:"15.01",y1:"13",y2:"13"}],["line",{x1:"18",x2:"18.01",y1:"11",y2:"11"}],["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),Tt((()=>jn(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white text-background z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),Kn(3,r,(()=>Pr)),ln(t,r)};vn(i,(t=>{r()&&t(l)})),ln(t,o),Q()}(u,{get position(){return ze(c)},get visible(){return ze(d)},onClick:l});var f=xt(u,2),v=t=>{const e=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled}));Ro(t,{get showIntentToggle(){return ze(e)}})};vn(f,(t=>{o()&&t(v)}));var p=xt(f,2);const h=kt((()=>{var t,e;return null==(e=null==(t=i())?void 0:t.exitIntent)?void 0:e.enabled}));(function(t,e){X(e,!0);const[n,r]=vr();let o,i,l=br(e,"enabled",3,!0),a=!1;var s=Ho();Ze("mousemove",dt,(function(t){a||setTimeout((()=>a=!0),250),o.contains(t.target)||(i=Date.now())})),s.__mouseover=function(){l()&&!dr(lo,"$exitIntentDisabledByUser",n)&&a&&setTimeout((()=>{var t;i<Date.now()-50&&(null==(t=e.onIntent)||t.call(e))}),150)},nr(s,(t=>o=t),(()=>o)),ln(t,s),Q(),r()})(p,{get enabled(){return ze(h)},onIntent:()=>{o()||l()}}),oo(xt(p,2),{}),ln(t,s),Q(),r()}const Ko={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0}};let Yo={...Ko};function Zo(t={}){return Yo=Jo(Ko,t),Yo}function Jo(t,e){const n={...t};return Xo(t)&&Xo(e)&&Object.keys(e).forEach((r=>{Xo(e[r])?r in t?n[r]=Jo(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function Xo(t){return t&&"object"==typeof t&&!Array.isArray(t)}var Qo=en("<button><!></button>");Je(["click"]);var ti=en('<div class="flex h-62 w-full items-center justify-center"><!></div>'),ei=en('<div class="snap-center px-2"><!></div>'),ni=en('<!> <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-xl backdrop-blur-xl"><p class="text-foreground w-full text-center text-lg font-semibold">Fancy more?</p> <!></div>',1),ri=(t,e,n)=>ze(e).scrollBy({left:2*-ze(n),behavior:"smooth"}),oi=en('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'),ii=(t,e,n)=>ze(e).scrollBy({left:2*ze(n),behavior:"smooth"}),li=en('<button class="bg-background/85 hover:bg-foreground hover:text-background text-foreground absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 shadow-xl backdrop-blur-xl transition max-sm:hidden"><!></button>'),ai=en("<!> <!>",1),si=en('<div class="playlight-sdk-container svelte-14atk0f"><div class="h-full w-full"><div class="fade-edges-mask no-scrollbar relative flex h-full w-full snap-x gap-2 overflow-x-auto svelte-14atk0f"><!></div> <!></div></div>');function ui(t,e){X(e,!0);const[n,r]=vr();let o=it(!0),i=it(et([])),l=it(et([])),a=it(void 0),s=it(void 0),u=it(0),c=it(!1),d=it(!0);wr((async()=>{var t,e,n,r;if(at(l,await so.getCategories(),!0),(null==(t=ze(l))?void 0:t.length)>0){const t=await so.getCurrentGameInfo();at(a,(null==t?void 0:t.category)&&(null==(e=ze(l))?void 0:e.includes(null==t?void 0:t.category))?null==t?void 0:t.category:null==(r=ze(l))?void 0:r[(null==(n=ze(l))?void 0:n.length)-1],!0)}await async function(){try{at(o,!0);let t=await so.getSuggestions(ze(a),1),e=(null==t?void 0:t.games)||[];if(e.length<10&&ze(a)){const t=await so.getSuggestions(null,1),n=((null==t?void 0:t.games)||[]).filter((t=>!e.some((e=>e.id===t.id))));e=[...e,...n]}at(i,e.slice(0,10),!0)}catch(t){console.error("Failed to load games for widget:",t)}finally{at(o,!1)}}()}));var f=si(),v=bt(f),p=bt(v),h=bt(p),g=t=>{var e=ti();_r(bt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),ln(t,e)},m=t=>{var e=ni(),n=wt(e);mn(n,17,(()=>ze(i)),gn,((t,e)=>{var n,r,o,i,l=ei();go(bt(l),{get game(){return ze(e)},compact:!0}),n=l,r="clientWidth",o=t=>at(u,t),i=tr.observe(n,(()=>o(n[r]))),zt((()=>(Ee((()=>o(n[r]))),i))),ln(t,l)}));var r=xt(n,2);(function(t,e){var n=Qo();n.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},function(t,e,...n){var r,o=t,i=I;At((()=>{i!==(i=e())&&(r&&(Lt(r),r=null),r=Bt((()=>i(o,...n))))}),D)}(bt(n),(()=>e.children??I)),Tt((()=>jn(n,1,`bg-foreground hover:bg-background hover:text-primary text-md cursor-pointer px-3 py-2 font-bold uppercase transition $${e.class??""}`))),ln(t,n)})(xt(bt(r),2),{onclick:()=>{fr(io,!0),so.trackOpen()},children:(t,e)=>{ln(t,rn("See all"))}}),ln(t,e)};vn(h,(t=>{ze(o)?t(g):t(m,!1)})),nr(p,(t=>at(s,t)),(()=>ze(s)));var y=xt(p,2),b=t=>{var e=ai(),n=wt(e),r=t=>{var e=oi();e.__click=[ri,s,u],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-left"},(()=>n),{iconNode:[["path",{d:"m15 18-6-6 6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:22,strokeWidth:2.75}),Kn(3,e,(()=>Pr)),ln(t,e)};vn(n,(t=>{ze(c)&&t(r)}));var o=xt(n,2),i=t=>{var e=li();e.__click=[ii,s,u],function(t,e){const n=hr(e,["children","$$slots","$$events","$$legacy"]);kr(t,mr({name:"chevron-right"},(()=>n),{iconNode:[["path",{d:"m9 18 6-6-6-6"}]],children:(t,n)=>{var r=on();$n(wt(r),e,"default",{},null),ln(t,r)},$$slots:{default:!0}}))}(bt(e),{size:22,strokeWidth:2.75}),Kn(3,e,(()=>Pr)),ln(t,e)};vn(o,(t=>{ze(d)&&t(i)})),ln(t,e)};vn(y,(t=>{ze(i).length>0&&t(b)})),Ze("scroll",p,(t=>{at(c,t.target.scrollLeft>20),at(d,t.target.scrollLeft<t.target.scrollWidth-t.target.clientWidth-20)})),ln(t,f),Q(),r()}function ci(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach((t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",cn(ui,{target:t}))}))}catch(t){console.error("Playlight error occurred initializing and mounting carousel widget:",t)}}Je(["click"]);const di=new(d=class{constructor(){g(this,u),this.container=null,this.isInitialized=!1,this.config=ar(null),this.api=so}async init(t={}){return"undefined"==typeof window?console.error("Playlight cannot run on the server, as it depends on browser APIs."):this.isInitialized?(console.warn("Playlight SDK already initialized!"),void(document.getElementById("playlight-sdk-container")||y(this,u,c).call(this))):(this.setConfig(t),y(this,u,c).call(this),ci(),function(){try{new MutationObserver((()=>{ci()})).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Playlight error occurred setting up widget observer:",t)}}(),await this.api.getCurrentGameInfo(),void(this.isInitialized=!0))}setDiscovery(t=!0){this.isInitialized&&(io.set(t),t&&so.trackOpen())}setConfig(t={}){var e;null==(e=this.config)||e.set(Zo(t))}},u=new WeakSet,c=function(){try{this.container=document.createElement("div"),this.container.id="playlight-sdk-container",this.container.className="playlight-sdk-container",document.body.appendChild(this.container),cn(Uo,{target:this.container,props:{config:this.config}})}catch(t){console.error("Playlight error occured during mount:",t)}},d);return"undefined"!=typeof window&&(window.playlightSDK=di),di}();
23
23
  //# sourceMappingURL=playlight-sdk.iife.js.map