playlight-sdk 0.0.1
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.
- package/LICENSE +21 -0
- package/dist/playlight-sdk.css +1 -0
- package/dist/playlight-sdk.es.js +3737 -0
- package/dist/playlight-sdk.es.js.map +1 -0
- package/dist/playlight-sdk.iife.js +23 -0
- package/dist/playlight-sdk.iife.js.map +1 -0
- package/dist/static/fonts/Geist[wght].ttf +0 -0
- package/dist/static/images/logo-white-small.png +0 -0
- package/dist/static/sounds/hover-selection.ogg +0 -0
- package/package.json +59 -0
- package/readme.md +16 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var PlaylightSDK=function(){"use strict";var t=Array.isArray,e=Array.prototype.indexOf,n=Array.from,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,l=Object.prototype,a=Array.prototype,s=Object.getPrototypeOf;function u(t){return"function"==typeof t}const c=()=>{};function d(t){return t()}function f(t){for(var e=0;e<t.length;e++)t[e]()}const v=256,p=1024,h=2048,g=4096,m=8192,y=16384,w=65536,b=Symbol("$state"),x=Symbol("legacy props"),_=Symbol("");function $(t){return t===this.v}function k(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function C(t){return!k(t,this.v)}let S=!1;const P=Symbol(),M="http://www.w3.org/2000/svg";function E(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let j=null;function I(t){j=t}function N(t,e=!1,n){j={p:j,c:null,e:null,m:!1,s:t,x:null,l:null},S&&!e&&(j.l={s:null,u:null,r1:[],r2:T(!1)})}function O(t){const e=j;if(null!==e){const t=e.e;if(null!==t){var n=Ft,r=Lt;e.e=null;try{for(var o=0;o<t.length;o++){var i=t[o];Rt(i.effect),Wt(i.reaction),dt(i.fn)}}finally{Rt(n),Wt(r)}}j=e.p,e.m=!0}return{}}function B(){return!S||null!==j&&null===j.l}function T(t,e){return{f:0,v:t,reactions:null,equals:$,rv:0,wv:0}}function z(t){return L(T(t))}function A(t,e=!1){var n;const r=T(t);return e||(r.equals=C),S&&null!==j&&null!==j.l&&((n=j.l).s??(n.s=[])).push(r),r}function D(t,e=!1){return L(A(t,e))}function L(t){return null!==Lt&&!qt&&2&Lt.f&&(null===Ht?Ht=[t]:Ht.push(t)),t}function q(t,e){return null!==Lt&&!qt&&B()&&18&Lt.f&&(null===Ht||!Ht.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),W(t,e)}function W(t,e){return t.equals(e)||(t.v,t.v=e,t.wv=Jt(),R(t,h),B()&&null!==Ft&&Ft.f&p&&!(96&Ft.f)&&(null===Kt?Kt=[t]:Kt.push(t))),e}function F(t,e=1){var n=ce(t),r=1===e?n++:n--;return q(t,n),r}function R(t,e){var n=t.reactions;if(null!==n)for(var r=B(),o=n.length,i=0;i<o;i++){var l=n[i],a=l.f;a&h||(r||l!==Ft)&&(ve(l,e),1280&a&&(2&a?R(l,g):se(l)))}}function H(e,n=null,r){if("object"!=typeof e||null===e||b in e)return e;const i=s(e);if(i!==l&&i!==a)return e;var u,c=new Map,d=t(e),f=T(0);return d&&c.set("length",T(e.length)),new Proxy(e,{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=c.get(e);return void 0===r?(r=T(n.value),c.set(e,r)):q(r,H(n.value,u)),!0},deleteProperty(t,e){var n=c.get(e);if(void 0===n)e in t&&c.set(e,T(P));else{if(d&&"string"==typeof e){var r=c.get("length"),o=Number(e);Number.isInteger(o)&&o<r.v&&q(r,o)}q(n,P),V(f)}return!0},get(t,n,r){var i;if(n===b)return e;var l=c.get(n),a=n in t;if(void 0!==l||a&&!(null==(i=o(t,n))?void 0:i.writable)||(l=T(H(a?t[n]:P,u)),c.set(n,l)),void 0!==l){var s=ce(l);return s===P?void 0:s}return Reflect.get(t,n,r)},getOwnPropertyDescriptor(t,e){var n=Reflect.getOwnPropertyDescriptor(t,e);if(n&&"value"in n){var r=c.get(e);r&&(n.value=ce(r))}else if(void 0===n){var o=c.get(e),i=null==o?void 0:o.v;if(void 0!==o&&i!==P)return{enumerable:!0,configurable:!0,value:i,writable:!0}}return n},has(t,e){var n;if(e===b)return!0;var r=c.get(e),i=void 0!==r&&r.v!==P||Reflect.has(t,e);return!((void 0!==r||null!==Ft&&(!i||(null==(n=o(t,e))?void 0:n.writable)))&&(void 0===r&&(r=T(i?H(t[e],u):P),c.set(e,r)),ce(r)===P))&&i},set(t,e,n,r){var i,l=c.get(e),a=e in t;if(d&&"length"===e)for(var s=n;s<l.v;s+=1){var v=c.get(s+"");void 0!==v?q(v,P):s in t&&(v=T(P),c.set(s+"",v))}void 0===l?a&&!(null==(i=o(t,e))?void 0:i.writable)||(q(l=T(void 0),H(n,u)),c.set(e,l)):(a=l.v!==P,q(l,H(n,u)));var p=Reflect.getOwnPropertyDescriptor(t,e);if((null==p?void 0:p.set)&&p.set.call(r,n),!a){if(d&&"string"==typeof e){var h=c.get("length"),g=Number(e);Number.isInteger(g)&&g>=h.v&&q(h,g+1)}V(f)}return!0},ownKeys(t){ce(f);var e=Reflect.ownKeys(t).filter((t=>{var e=c.get(t);return void 0===e||e.v!==P}));for(var[n,r]of c)r.v===P||n in t||e.push(n);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function V(t,e=1){q(t,t.v+e)}var G,K,U,Z,Y;function J(t=""){return document.createTextNode(t)}function X(t){return Z.call(t)}function Q(t){return Y.call(t)}function tt(t,e){return X(t)}function et(t,e){var n=X(t);return n instanceof Comment&&""===n.data?Q(n):n}function nt(t,e=1,n=!1){let r=t;for(;e--;)r=Q(r);return r}function rt(t){var e=2050,n=null!==Lt&&2&Lt.f?Lt:null;return null===Ft||null!==n&&n.f&v?e|=v:Ft.f|=1048576,{ctx:j,deps:null,effects:null,equals:$,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:n??Ft}}function ot(t){const e=rt(t);return e.equals=C,e}function it(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)bt(e[n])}}function lt(t){var e=function(t){var e,n=Ft;Rt(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{it(t),e=ee(t)}finally{Rt(n)}return e}(t);ve(t,(Yt||t.f&v)&&null!==t.deps?g:p),t.equals(e)||(t.v=e,t.wv=Jt())}function at(t){null===Ft&&null===Lt&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Lt&&Lt.f&v&&null===Ft&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),zt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function st(t,e,n,r=!0){var o,i,l,a=!!(64&t),s=Ft,u={ctx:j,deps:null,nodes_start:null,nodes_end:null,f:t|h,first:null,fn:e,last:null,next:null,parent:a?null:s,prev:null,teardown:null,transitions:null,wv:0};if(n)try{oe(u),u.f|=32768}catch(o){throw bt(u),o}else null!==e&&se(u);if((!n||null!==u.deps||null!==u.first||null!==u.nodes_start||null!==u.teardown||1048704&u.f)&&!a&&r&&(null!==s&&(o=u,null===(l=(i=s).last)?i.last=i.first=o:(l.next=o,o.prev=l,i.last=o)),null!==Lt&&2&Lt.f)){var c=Lt;(c.effects??(c.effects=[])).push(u)}return u}function ut(t){const e=st(8,null,!1);return ve(e,p),e.teardown=t,e}function ct(t){if(at(),!(null!==Ft&&32&Ft.f&&null!==j)||j.m)return dt(t);var e=j;(e.e??(e.e=[])).push({fn:t,effect:Ft,reaction:Lt})}function dt(t){return st(4,t,!1)}function ft(t,e){var n=j,r={effect:null,ran:!1};n.l.r1.push(r),r.effect=pt((()=>{t(),r.ran||(r.ran=!0,q(n.l.r2,!0),de(e))}))}function vt(){var t=j;pt((()=>{if(ce(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&p&&ve(n,g),Xt(n)&&oe(n),e.ran=!1}t.l.r2.v=!1}}))}function pt(t){return st(8,t,!0)}function ht(t,e=[],n=rt){const r=e.map(n);return gt((()=>t(...r.map(ce))))}function gt(t,e=0){return st(24|e,t,!0)}function mt(t,e=!0){return st(40,t,!0,e)}function yt(t){var e=t.teardown;if(null!==e){const t=zt,n=Lt;At(!0),Wt(null);try{e.call(null)}finally{At(t),Wt(n)}}}function wt(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){var r=n.next;bt(n,e),n=r}}function bt(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:Q(r);r.remove(),r=i}n=!0}wt(t,e&&!n),re(t,0),ve(t,y);var l=t.transitions;if(null!==l)for(const s of l)s.stop();yt(t);var a=t.parent;null!==a&&null!==a.first&&xt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function xt(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 _t(t,e){var n=[];kt(t,n,!0),$t(n,(()=>{bt(t),e&&e()}))}function $t(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function kt(t,e,n){if(!(t.f&m)){if(t.f^=m,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;kt(r,e,!!(r.f&w||32&r.f)&&n),r=o}}}function Ct(t){St(t,!0)}function St(t,e){if(t.f&m){t.f^=m,t.f&p||(t.f^=p),Xt(t)&&(ve(t,h),se(t));for(var n=t.first;null!==n;){var r=n.next;St(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 Pt=[],Mt=[];function Et(){var t=Pt;Pt=[],f(t)}function jt(t){0===Pt.length&&queueMicrotask(Et),Pt.push(t)}function It(){var t;Pt.length>0&&Et(),Mt.length>0&&(t=Mt,Mt=[],f(t))}let Nt=!1,Ot=!1,Bt=null,Tt=!1,zt=!1;function At(t){zt=t}let Dt=[],Lt=null,qt=!1;function Wt(t){Lt=t}let Ft=null;function Rt(t){Ft=t}let Ht=null,Vt=null,Gt=0,Kt=null,Ut=1,Zt=0,Yt=!1;function Jt(){return++Ut}function Xt(t){var e,n=t.f;if(n&h)return!0;if(n&g){var r=t.deps,o=!!(n&v);if(null!==r){var i,l,a=!!(512&n),s=o&&null!==Ft&&!Yt,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&v||(c.f^=v)}for(i=0;i<u;i++)if(Xt(l=r[i])&<(l),l.wv>t.wv)return!0}o&&(null===Ft||Yt)||ve(t,p)}return!1}function Qt(t,e,n,r){if(Nt){if(null===n&&(Nt=!1),!((o=e).f&y||null!==o.parent&&128&o.parent.f))throw t}else null!==n&&(Nt=!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 Nt=!1,t}(t,e);var o}function te(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?te(i,e,!1):e===i&&(n?ve(i,h):i.f&p&&ve(i,g),se(i))}}function ee(t){var e,n=Vt,r=Gt,o=Kt,i=Lt,l=Yt,a=Ht,s=j,u=qt,c=t.f;Vt=null,Gt=0,Kt=null,Yt=!!(c&v)&&(qt||!Tt||null===Lt),Lt=96&c?null:t,Ht=null,I(t.ctx),qt=!1,Zt++;try{var d=(0,t.fn)(),f=t.deps;if(null!==Vt){var p;if(re(t,Gt),null!==f&&Gt>0)for(f.length=Gt+Vt.length,p=0;p<Vt.length;p++)f[Gt+p]=Vt[p];else t.deps=f=Vt;if(!Yt)for(p=Gt;p<f.length;p++)((e=f[p]).reactions??(e.reactions=[])).push(t)}else null!==f&&Gt<f.length&&(re(t,Gt),f.length=Gt);if(B()&&null!==Kt&&!qt&&null!==f&&!(6146&t.f))for(p=0;p<Kt.length;p++)te(Kt[p],t);return null!==i&&Zt++,d}finally{Vt=n,Gt=r,Kt=o,Lt=i,Yt=l,Ht=a,I(s),qt=u}}function ne(t,n){let r=n.reactions;if(null!==r){var o=e.call(r,t);if(-1!==o){var i=r.length-1;0===i?r=n.reactions=null:(r[o]=r[i],r.pop())}}null===r&&2&n.f&&(null===Vt||!Vt.includes(n))&&(ve(n,g),768&n.f||(n.f^=512),it(n),re(n,0))}function re(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)ne(t,n[r])}function oe(t){var e=t.f;if(!(e&y)){ve(t,p);var n=Ft,r=j,o=Tt;Ft=t,Tt=!0;try{16&e?function(t){for(var e=t.first;null!==e;){var n=e.next;32&e.f||bt(e),e=n}}(t):wt(t),yt(t);var i=ee(t);t.teardown="function"==typeof i?i:null,t.wv=Ut,t.deps}catch(l){Qt(l,t,n,r||t.ctx)}finally{Tt=o,Ft=n}}}function ie(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){if(null===Bt)throw t;Qt(t,Bt,null)}}function le(){try{for(var t=0;Dt.length>0;){t++>1e3&&ie();var e=Dt,n=e.length;Dt=[];for(var r=0;r<n;r++){var o=e[r];o.f&p||(o.f^=p),ae(ue(o))}}}finally{Ot=!1,Bt=null}}function ae(t){var e=t.length;if(0!==e)for(var n=0;n<e;n++){var r=t[n];if(!(24576&r.f))try{Xt(r)&&(oe(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown?xt(r):r.fn=null))}catch(o){Qt(o,r,null,r.ctx)}}}function se(t){Ot||(Ot=!0,queueMicrotask(le));for(var e=Bt=t;null!==e.parent;){var n=(e=e.parent).f;if(96&n){if(!(n&p))return;e.f^=p}}Dt.push(e)}function ue(t){for(var e=[],n=t.first;null!==n;){var r=n.f,o=!!(32&r);if(!(o&&r&p||r&m)){if(4&r)e.push(n);else if(o)n.f^=p;else{var i=Lt;try{Lt=n,Xt(n)&&oe(n)}catch(s){Qt(s,n,null,n.ctx)}finally{Lt=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 ce(t){var e=!!(2&t.f);if(null===Lt||qt){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null===r||r.f&v||(n.f^=v)}}else{null!==Ht&&Ht.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}();var o=Lt.deps;t.rv<Zt&&(t.rv=Zt,null===Vt&&null!==o&&o[Gt]===t?Gt++:null===Vt?Vt=[t]:Yt&&Vt.includes(t)||Vt.push(t))}return e&&Xt(n=t)&<(n),t.v}function de(t){var e=qt;try{return qt=!0,t()}finally{qt=e}}const fe=-7169;function ve(t,e){t.f=t.f&fe|e}function pe(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(b in t)he(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&b in n&&he(n)}}function he(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{he(t[o],e)}catch(n){}const r=s(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=i(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function ge(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const me=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ye(t){return me.includes(t)}const we={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 be(t){return t=t.toLowerCase(),we[t]??t}const xe=["touchstart","touchmove"];function _e(t){return xe.includes(t)}function $e(t,e){if(e){const e=document.body;t.autofocus=!0,jt((()=>{document.activeElement===e&&t.focus()}))}}let ke=!1;function Ce(t){var e=Lt,n=Ft;Wt(null),Rt(null);try{return t()}finally{Wt(e),Rt(n)}}const Se=new Set,Pe=new Set;function Me(t,e,n,r={}){function o(t){if(r.capture||Ie.call(e,t),!t.cancelBubble)return Ce((()=>null==n?void 0:n.call(this,t)))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?jt((()=>{e.addEventListener(t,o,r)})):e.addEventListener(t,o,r),o}function Ee(t,e,n,r,o){var i={capture:r,passive:o},l=Me(t,e,n,i);e!==document.body&&e!==window&&e!==document||ut((()=>{e.removeEventListener(t,l,i)}))}function je(t){for(var e=0;e<t.length;e++)Se.add(t[e]);for(var n of Pe)n(t)}function Ie(e){var n,o=this,i=o.ownerDocument,l=e.type,a=(null==(n=e.composedPath)?void 0:n.call(e))||[],s=a[0]||e.target,u=0,c=e.__root;if(c){var d=a.indexOf(c);if(-1!==d&&(o===document||o===window))return void(e.__root=o);var f=a.indexOf(o);if(-1===f)return;d<=f&&(u=d)}if((s=a[u]||e.target)!==o){r(e,"currentTarget",{configurable:!0,get:()=>s||i});var v=Lt,p=Ft;Wt(null),Rt(null);try{for(var h,g=[];null!==s;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+l];if(void 0!==y&&(!s.disabled||e.target===s))if(t(y)){var[w,...b]=y;w.apply(s,[e,...b])}else y.call(s,e)}catch(x){h?g.push(x):h=x}if(e.cancelBubble||m===o||null===m)break;s=m}if(h){for(let t of g)queueMicrotask((()=>{throw t}));throw h}}finally{e.__root=o,delete e.currentTarget,Wt(v),Rt(p)}}}function Ne(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function Oe(t,e){var n=Ft;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Be(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ne(i?t:"<!>"+t),r||(n=X(n)));var e=o||U?document.importNode(n,!0):n.cloneNode(!0);return r?Oe(X(e),e.lastChild):Oe(e,e),e}}function Te(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=X(Ne(o));r=X(t)}var e=r.cloneNode(!0);return Oe(e,e),e}}function ze(t=""){var e=J(t+"");return Oe(e,e),e}function Ae(){var t=document.createDocumentFragment(),e=document.createComment(""),n=J();return t.append(e,n),Oe(e,n),t}function De(t,e){null!==t&&t.before(e)}let Le=!0;function qe(t){Le=t}function We(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}const Fe=new Map;let Re=new WeakMap;function He(t,e,n=!1){var r=t,o=null,i=null,l=P,a=!1;const s=(t,e=!0)=>{a=!0,u(e,t)},u=(t,e)=>{l!==(l=t)&&(l?(o?Ct(o):e&&(o=mt((()=>e(r)))),i&&_t(i,(()=>{i=null}))):(i?Ct(i):e&&(i=mt((()=>e(r)))),o&&_t(o,(()=>{o=null}))))};gt((()=>{a=!1,e(s),a||u(null,null)}),n?w:0)}let Ve=null;function Ge(t){Ve=t}function Ke(t,e){return e}function Ue(e,r,o,i,l,a=null){var s=e,u={flags:r,items:new Map,first:null};!(4&r)||(s=e.appendChild(J()));var c=null,d=!1,f=ot((()=>{var e=o();return t(e)?e:null==e?[]:n(e)}));gt((()=>{var t=ce(f),e=t.length;d&&0===e||(d=0===e,function(t,e,r,o,i,l,a){var s,u,c,d,f,v,p,h,g,y,w=!!(8&i),b=!!(3&i),x=t.length,_=e.items,$=e.first,k=null,C=[],S=[];if(w)for(y=0;y<x;y+=1)h=l(p=t[y],y),void 0!==(g=_.get(h))&&(null==(s=g.a)||s.measure(),(v??(v=new Set)).add(g));for(y=0;y<x;y+=1)if(h=l(p=t[y],y),void 0!==(g=_.get(h))){if(b&&Ze(g,p,y,i),g.e.f&m&&(Ct(g.e),w&&(null==(u=g.a)||u.unfix(),(v??(v=new Set)).delete(g))),g!==$){if(void 0!==f&&f.has(g)){if(C.length<S.length){var P,M=S[0];k=M.prev;var E=C[0],j=C[C.length-1];for(P=0;P<C.length;P+=1)Je(C[P],M,r);for(P=0;P<S.length;P+=1)f.delete(S[P]);Xe(e,E.prev,j.next),Xe(e,k,E),Xe(e,j,M),$=M,k=j,y-=1,C=[],S=[]}else f.delete(g),Je(g,$,r),Xe(e,g.prev,g.next),Xe(e,g,null===k?e.first:k.next),Xe(e,k,g),k=g;continue}for(C=[],S=[];null!==$&&$.k!==h;)$.e.f&m||(f??(f=new Set)).add($),S.push($),$=$.next;if(null===$)continue;g=$}C.push(g),k=g,$=g.next}else k=Ye($?$.e.nodes_start:r,e,k,null===k?e.first:k.next,p,h,y,o,i,a),_.set(h,k),C=[],S=[],$=k.next;if(null!==$||void 0!==f){for(var I=void 0===f?[]:n(f);null!==$;)$.e.f&m||I.push($),$=$.next;var N=I.length;if(N>0){var O=4&i&&0===x?r:null;if(w){for(y=0;y<N;y+=1)null==(c=I[y].a)||c.measure();for(y=0;y<N;y+=1)null==(d=I[y].a)||d.fix()}!function(t,e,n,r){for(var o=[],i=e.length,l=0;l<i;l++)kt(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(),Xe(t,e[0].prev,e[i-1].next)}$t(o,(()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),Xe(t,o.prev,o.next)),bt(o.e,!a)}}))}(e,I,O,_)}}w&&jt((()=>{var t;if(void 0!==v)for(g of v)null==(t=g.a)||t.apply()})),Ft.first=e.first&&e.first.e,Ft.last=k&&k.e}(t,u,s,l,r,i,o),null!==a&&(0===e?c?Ct(c):c=mt((()=>a(s))):null!==c&&_t(c,(()=>{c=null}))),ce(f))}))}function Ze(t,e,n,r){1&r&&W(t.v,e),2&r?W(t.i,n):t.i=n}function Ye(t,e,n,r,o,i,l,a,s,u){var c=Ve,d=1&s?16&s?T(o):A(o):o,f=2&s?T(l):l,v={i:f,v:d,k:i,a:null,e:null,prev:n,next:r};Ve=v;try{return v.e=mt((()=>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{Ve=c}}function Je(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=Q(i);o.before(i),i=l}}function Xe(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 Qe(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 tn(t,e,n){var r,o,i=t;gt((()=>{r!==(r=e())&&(o&&(_t(o),o=null),r&&(o=mt((()=>n(i,r)))))}),w)}function en(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=en(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function nn(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=en(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const rn=[..." \t\n\r\f \v\ufeff"];function on(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&&!rn.includes(r[l-1])||a!==r.length&&!rn.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)for(var a in i){var s=!!i[a];null!=o&&s===!!o[a]||t.classList.toggle(a,s)}return i}const ln=Symbol("class");function an(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function sn(t,e,n,r){var o=t.__attributes??(t.__attributes={});o[e]!==(o[e]=n)&&("style"===e&&"__styles"in t&&(t.__styles={}),"loading"===e&&(t[_]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&dn(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function un(t,e,n,r,o=!1,i=!1,l=!1){var a=e||{},s="OPTION"===t.tagName;for(var u in e)u in n||(n[u]=null);n.class?n.class=nn(n.class):(r||n[ln])&&(n.class=null);var c=dn(t),d=t.__attributes??(t.__attributes={});for(const m in n){let l=n[m];if(s&&"value"===m&&null==l)t.value=t.__value="",a[m]=l;else if("class"!==m){var f=a[m];if(l!==f){a[m]=l;var v=m[0]+m[1];if("$$"!==v){if("on"===v){const e={},n="$$"+m;let r=m.slice(2);var p=ye(r);if(ge(r)&&(r=r.slice(0,-7),e.capture=!0),!p&&f){if(null!=l)continue;t.removeEventListener(r,a[n],e),a[n]=null}if(null!=l)if(p)t[`__${r}`]=l,je([r]);else{let o=function(t){a[m].call(this,t)};a[n]=Me(r,t,o,e)}else p&&(t[`__${r}`]=void 0)}else if("style"===m&&null!=l)t.style.cssText=l+"";else if("autofocus"===m)$e(t,Boolean(l));else if(i||"__value"!==m&&("value"!==m||null==l))if("selected"===m&&s)an(t,l);else{var h=m;o||(h=be(h));var g="defaultValue"===h||"defaultChecked"===h;if(null!=l||i||g)g||c.includes(h)&&(i||"string"!=typeof l)?t[h]=l:"function"!=typeof l&&sn(t,h,l);else if(d[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=l;"style"===m&&"__styles"in t&&(t.__styles={})}}}else on(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,l,r,null==e?void 0:e[ln],n[ln]),a[m]=l,a[ln]=n[ln]}return a}var cn=new Map;function dn(t){var e,n=cn.get(t.nodeName);if(n)return n;cn.set(t.nodeName,n=[]);for(var r=t,o=Element.prototype;o!==r;){for(var l in e=i(r))e[l].set&&n.push(l);r=s(r)}return n}function fn(t,e,n,r){var o=t.__styles??(t.__styles={});o[e]!==n&&(o[e]=n,null==n?t.style.removeProperty(e):t.style.setProperty(e,n,""))}const vn={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function pn(){const t=vn.now();vn.tasks.forEach((e=>{e.c(t)||(vn.tasks.delete(e),e.f())})),0!==vn.tasks.size&&vn.tick(pn)}function hn(t,e){Ce((()=>{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 mn(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 yn=t=>t;function wn(t,e,n,r){var o,i,l,a=!!(4&t),s=e.inert,u=e.style.overflow;function c(){var t=Lt,i=Ft;Wt(null),Rt(null);try{return o??(o=n()(e,(null==r?void 0:r())??{},{direction:"both"}))}finally{Wt(t),Rt(i)}}var d={is_global:a,in(){e.inert=s,hn(e,"introstart"),i=bn(e,c(),l,1,(()=>{hn(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=u}))},out(t){e.inert=!0,hn(e,"outrostart"),l=bn(e,c(),i,0,(()=>{hn(e,"outroend"),null==t||t()}))},stop:()=>{null==i||i.abort(),null==l||l.abort()}},f=Ft;if((f.transitions??(f.transitions=[])).push(d),Le){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&&dt((()=>{de((()=>d.in()))}))}}function bn(t,e,n,r,o){var i=1===r;if(u(e)){var l,a=!1;return jt((()=>{if(!a){var s=e({direction:i?"in":"out"});l=bn(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:c,deactivate:c,reset:c,t:()=>r};const{delay:s=0,css:d,tick:f,easing:v=yn}=e;var p=[];if(i&&void 0===n&&(f&&f(0,1),d)){var h=mn(d(0,1));p.push(h,h)}var g=()=>1-r,m=t.animate(p,{duration:s});return m.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 u=!1;if(d)for(var c=Math.ceil(a/(1e3/60)),p=0;p<=c;p+=1){var h=i+l*v(p/c),y=mn(d(h,1-h));s.push(y),u||(u="hidden"===y.overflow)}u&&(t.style.overflow="hidden"),g=()=>{var t=m.currentTime;return i+l*v(t/a)},f&&function(t){let e;0===vn.tasks.size&&vn.tick(pn),new Promise((n=>{vn.tasks.add(e={c:t,f:n})}))}((()=>{if("running"!==m.playState)return!1;var t=g();return f(t,1-t),!0}))}(m=t.animate(s,{duration:a,fill:"forwards"})).onfinish=()=>{g=()=>r,null==f||f(r,1-r),o()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=c)},deactivate:()=>{o=c},reset:()=>{0===r&&(null==f||f(1,0))},t:()=>g()}}function xn(t){var e=t.type;return"number"===e||"range"===e}function _n(t){return""===t?null:+t}function $n(t,e){return t===e||(null==t?void 0:t[b])===e}function kn(t={},e,n,r){return dt((()=>{var r,o;return pt((()=>{r=o,o=[],de((()=>{t!==n(...o)&&(e(t,...o),r&&$n(n(...r),t)&&e(null,...r))}))})),()=>{jt((()=>{o&&$n(n(...o),t)&&e(null,...o)}))}})),t}function Cn(t=!1){const e=j,n=e.l.u;if(!n)return;let r=()=>pe(e.s);if(t){let t=0,n={};const o=rt((()=>{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=()=>ce(o)}var o;n.b.length&&(o=()=>{Sn(e,r),f(n.b)},at(),pt(o)),ct((()=>{const t=de((()=>n.m.map(d)));return()=>{for(const e of t)"function"==typeof e&&e()}})),n.a.length&&ct((()=>{Sn(e,r),f(n.a)}))}function Sn(t,e){if(t.l.s)for(const n of t.l.s)ce(n);e()}function Pn(t,e,n){if(null==t)return e(void 0),c;const r=de((()=>t.subscribe(e,n)));return r.unsubscribe?()=>r.unsubscribe():r}const Mn=[];function En(t,e=c){let n=null;const r=new Set;function o(e){if(k(t,e)&&(t=e,n)){const e=!Mn.length;for(const n of r)n[1](),Mn.push(n,t);if(e){for(let t=0;t<Mn.length;t+=2)Mn[t][0](Mn[t+1]);Mn.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,a=c){const s=[l,a];return r.add(s),1===r.size&&(n=e(o,i)||c),l(t),()=>{r.delete(s),0===r.size&&n&&(n(),n=null)}}}}function jn(t){let e;return Pn(t,(t=>e=t))(),e}let In=!1,Nn=Symbol();function On(t,e,n){const r=n[e]??(n[e]={store:null,source:A(void 0),unsubscribe:c});if(r.store!==t&&!(Nn in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=c;else{var o=!0;r.unsubscribe=Pn(t,(t=>{o?r.source.v=t:q(r.source,t)})),o=!1}return t&&Nn in n?jn(t):ce(r.source)}function Bn(t,e){return t.set(e),e}function Tn(){const t={};return[t,function(){ut((()=>{for(var e in t)t[e].unsubscribe();r(t,Nn,{enumerable:!1,value:!0})}))}]}const zn={get(t,e){if(!t.exclude.includes(e))return ce(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=qn({get[e](){return t.props[e]}},e,4)),t.special[e](n),F(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),F(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 An(t,e){return new Proxy({props:t,exclude:e,special:{},version:T(0)},zn)}const Dn={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(u(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 i=t.props[r];u(i)&&(i=i());const l=o(i,e);if(l&&l.set)return l.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(u(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=o(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===b||e===x)return!1;for(let n of t.props)if(u(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props){u(n)&&(n=n());for(const t in n)e.includes(t)||e.push(t)}return e}};function Ln(...t){return new Proxy({props:t},Dn)}function qn(t,e,n,r){var i,l,a=!!(1&n),s=!S||!!(2&n),u=!!(8&n),c=!!(16&n),d=!1;u?[l,d]=function(t){var e=In;try{return In=!1,[t(),In]}finally{In=e}}((()=>t[e])):l=t[e];var f,v=b in t||x in t,p=u&&((null==(i=o(t,e))?void 0:i.set)??(v&&e in t&&(n=>t[e]=n)))||void 0,h=r,g=!0,m=!1,y=()=>(m=!0,g&&(g=!1,h=c?de(r):r),h);if(void 0===l&&void 0!==r&&(p&&s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),l=y(),p&&p(l)),s)f=()=>{var n=t[e];return void 0===n?y():(g=!0,m=!1,n)};else{var w=(a?rt:ot)((()=>t[e]));w.f|=131072,f=()=>{var t=ce(w);return void 0!==t&&(h=void 0),void 0===t?h:t}}if(!(4&n))return f;if(p){var _=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!_&&!d||p(e?f():t),t):f()}}var $=!1,k=A(l),P=rt((()=>{var t=f(),e=ce(k);return $?($=!1,e):k.v=t}));return a||(P.equals=C),function(t,e){if(arguments.length>0){const n=e?ce(P):s&&u?H(t):t;return P.equals(n)||($=!0,q(k,n),m&&void 0!==h&&(h=n),de((()=>ce(P)))),t}return ce(P)}}function Wn(t){var e,n;null===j&&E(),S&&null!==j.l?(e=j,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):ct((()=>{const e=de(t);if("function"==typeof e)return e}))}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("5"),S=!0;
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-svelte v0.476.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* ISC License
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
8
|
+
*
|
|
9
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
11
|
+
* copyright notice and this permission notice appear in all copies.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
14
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
15
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
16
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
17
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
18
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
19
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
const Fn={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 Rn=Te("<svg><!><!></svg>");function Hn(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]),r=An(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);N(e,!1);let o=qn(e,"name",8,void 0),i=qn(e,"color",8,"currentColor"),l=qn(e,"size",8,24),a=qn(e,"strokeWidth",8,2),s=qn(e,"absoluteStrokeWidth",8,!1),u=qn(e,"iconNode",24,(()=>[]));Cn();var c=Rn();let d;var f=tt(c);Ue(f,1,u,Ke,((t,e)=>{var n,r,o,i,l,a,s,u,c,d=Ae();n=et(d),r=()=>ce(e)[0],o=(t,n)=>{let r;ht((()=>r=un(t,r,{...ce(e)[1]},void 0,t.namespaceURI===M,t.nodeName.includes("-"))))},s=null,u=n,c=Ve,gt((()=>{const t=r()||null;var e=M;if(t!==i){var n=Ve;Ge(c),a&&(null===t?_t(a,(()=>{a=null,l=null})):t===l?Ct(a):(bt(a),qe(!1))),t&&t!==l&&(a=mt((()=>{if(Oe(s=document.createElementNS(e,t),s),o){var n=s.appendChild(J());o(s,n)}Ft.nodes_end=s,u.before(s)}))),(i=t)&&(l=i),qe(!0),Ge(n)}}),w),De(t,d)})),Qe(nt(f),e,"default",{},null),ht(((t,e)=>d=un(c,d,{...Fn,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e},void 0,!0)),[()=>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)],ot),De(t,c),O()}function Vn(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({name:"loader-circle"},(()=>n),{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}var Gn=(t,e)=>{var n;null==(n=e.onClick)||n.call(e)},Kn=Be('<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 svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');function Un(t){const e=t-1;return e*e*e+1}function Zn(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Yn(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Jn(t,{delay:e=0,duration:n=400,easing:r=Zn,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]=Yn(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-u*e}; filter: ${s} blur(${e*c}${d});`}}function Xn(t,{delay:e=0,duration:n=400,easing:r=Un,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]=Yn(o),[v,p]=Yn(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 Qn(t,{delay:e=0,duration:n=400,easing:r=Un,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 tr(t,{delay:e=0,duration:n=400,easing:r=Un,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`}}je(["click"]);var er=Te('<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>'),nr=Te('<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>'),rr=Te('<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>'),or=Te('<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 ir(t,e){let n=qn(e,"type",8,"success");var r=Ae(),o=et(r),i=t=>{De(t,er())},l=t=>{var e=Ae(),r=et(e),o=t=>{De(t,nr())},i=t=>{var e=Ae(),r=et(e),o=t=>{De(t,rr())},i=t=>{var e=Ae(),r=et(e),o=t=>{De(t,or())},i=t=>{};He(r,(t=>{"warning"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(r,(t=>{"info"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(r,(t=>{"error"===n()?t(o):t(i,!1)}),!0),De(t,e)};He(o,(t=>{"success"===n()?t(i):t(l,!1)})),De(t,r)}var lr=Be('<div class="sonner-loading-bar"></div>'),ar=Be('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');function sr(...t){return t.filter(Boolean).join(" ")}const ur="undefined"!=typeof document;function cr(t){const e=En(t);return{subscribe:e.subscribe,set:function(t){ur&&e.set(t)},update:function(t){ur&&e.update(t)}}}let dr=0;const fr=function(){const t=cr([]),e=cr([]);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:dr++,a=void 0===e.dismissable||e.dismissable,s=void 0===e.type?"default":e.type;return jn(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)||dr++;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!==jn(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 fr.create({message:t,...e})}),{success:fr.success,info:fr.info,warning:fr.warning,error:fr.error,custom:fr.custom,message:fr.message,promise:fr.promise,dismiss:fr.dismiss,loading:fr.loading});var pr=Be('<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>'),hr=Be('<div data-icon=""><!> <!></div>'),gr=Be('<div data-title=""><!></div>'),mr=Be('<div data-description=""><!></div>'),yr=Be('<button data-button="" data-cancel=""> </button>'),wr=Be('<button data-button=""> </button>'),br=Be('<!> <div data-content=""><!> <!></div> <!> <!>',1),xr=Be('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');function _r(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);N(e,!1);const[r,o]=Tn(),i=()=>On(_,"$heights",r),l=()=>On(ce(ct),"$effect",r),a=D(void 0,!0),s=D(void 0,!0),u=D(void 0,!0),d=D(void 0,!0),f=D(void 0,!0),v=D(void 0,!0),p=D(void 0,!0),h=D(void 0,!0),g=D(void 0,!0),m=D(void 0,!0),y=D(void 0,!0),w=D(void 0,!0),b={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""},{toasts:x,heights:_,removeHeight:$,setHeight:k,remove:C}=fr;let S=qn(e,"toast",9),P=qn(e,"index",9),M=qn(e,"expanded",9),E=qn(e,"invert",13),j=qn(e,"position",9),I=qn(e,"visibleToasts",9),B=qn(e,"expandByDefault",9),T=qn(e,"closeButton",9),z=qn(e,"interacting",9),A=qn(e,"cancelButtonStyle",9,""),L=qn(e,"actionButtonStyle",9,""),W=qn(e,"duration",9,4e3),F=qn(e,"descriptionClass",9,""),R=qn(e,"classes",29,(()=>({}))),H=qn(e,"unstyled",9,!1),V=D(!1,!0),G=D(!1,!0),K=D(!1,!0),U=D(!1,!0),Z=D(0,!0),Y=D(0,!0),J=D(void 0,!0),X=D(0,!0),Q=0,rt=0,it=null;function lt(){q(G,!0),q(Z,ce(X)),$(S().id),setTimeout((()=>{C(S().id)}),200)}let at=D(void 0,!0),st=D(S().duration||W()||4e3,!0);function ut(){Q=(new Date).getTime(),q(at,setTimeout((()=>{var t,e;null==(e=(t=S()).onAutoClose)||e.call(t,S()),lt()}),ce(st)))}let ct=D(void 0,!0);Wn((()=>{q(V,!0);const t=ce(J).getBoundingClientRect().height;return q(Y,t),k({toastId:S().id,height:t}),()=>$(S().id)})),ft((()=>pe(R())),(()=>{R({...b,...R()})})),ft((()=>pe(P())),(()=>{q(a,0===P())})),ft((()=>(pe(P()),pe(I()))),(()=>{q(s,P()+1<=I())})),ft((()=>pe(S())),(()=>{q(u,S().title)})),ft((()=>pe(S())),(()=>{q(d,S().description)})),ft((()=>pe(S())),(()=>{q(f,S().type)})),ft((()=>pe(S())),(()=>{q(v,S().class||"")})),ft((()=>pe(S())),(()=>{q(p,S().descriptionClass||"")})),ft((()=>(i(),pe(S()))),(()=>{q(h,i().findIndex((t=>t.toastId===S().id))||0)})),ft((()=>pe(j())),(()=>{q(g,j().split("-"))})),ft((()=>(i(),ce(h))),(()=>{q(m,i().reduce(((t,e,n)=>n>=ce(h)?t:t+e.height),0))})),ft((()=>(pe(E()),pe(S()))),(()=>{E(S().invert||E())})),ft((()=>ce(f)),(()=>{q(y,"loading"===ce(f))})),ft((()=>(ce(h),ce(m))),(()=>{q(X,Math.round(14*ce(h)+ce(m)))})),ft((()=>(ce(u),ce(d))),(()=>{ce(u),ce(d),async function(){if(!ce(V))return;let t;await async function(){await Promise.resolve(),function(){for(It();Dt.length>0;)Ot=!0,le(),It()}()}(),t=M()||B()?1:1-.05*P(),ce(J).style.setProperty("height","auto");const e=ce(J).offsetHeight,n=ce(J).getBoundingClientRect().height,r=Math.round(100*(n/t+Number.EPSILON))/100;let o;ce(J).style.removeProperty("height"),o=Math.abs(r-e)<1?r:e,q(Y,o),k({toastId:S().id,height:o})}()})),ft((()=>(pe(S()),ce(at),pe(W()))),(()=>{S().updated&&(clearTimeout(ce(at)),q(st,S().duration||W()||4e3),ut())})),ft((()=>(pe(S()),ce(f))),(()=>{q(w,S().promise&&"loading"===ce(f)||S().duration===Number.POSITIVE_INFINITY)})),ft((()=>(ce(w),pe(M()),pe(z()),ce(at))),(()=>{var t;!function(t,e,n){let r=n[e];r&&r.store!==t&&(r.unsubscribe(),r.unsubscribe=c)}(q(ct,(t=()=>(ce(w)||(M()||z()?function(){if(rt<Q){const t=(new Date).getTime()-Q;q(st,ce(st)-t)}rt=(new Date).getTime()}():ut()),()=>clearTimeout(ce(at))),{subscribe:t})),"$effect",r)})),ft((()=>l()),(()=>{l()})),ft((()=>pe(S())),(()=>{S().delete&<()})),vt(),Cn(!0);var dt=xr();sn(dt,"tabindex",0);var pt=tt(dt),gt=t=>{var e=pr();ht((t=>{sn(e,"data-disabled",ce(y)),on(e,1,nn(t))}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.closeButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.closeButton)}],ot),Ee("click",e,(function(...t){var e;null==(e=ce(y)?void 0:()=>{var t,e;lt(),null==(e=(t=S()).onDismiss)||e.call(t,S())})||e.apply(this,t)})),De(t,e)};He(pt,(t=>{T()&&!S().component&&t(gt)}));var mt=nt(pt,2),yt=t=>{var e=Ae();tn(et(e),(()=>S().component),((t,e)=>{e(t,Ln((()=>S().componentProps),{$$events:{closeToast:lt}}))})),De(t,e)},wt=t=>{var n=br(),r=et(n),o=t=>{var n=hr(),r=tt(n),o=t=>{var n=Ae();Qe(et(n),e,"loading-icon",{},null),De(t,n)};He(r,(t=>{!S().promise&&"loading"!==ce(f)||S().icon||t(o)}));var i=nt(r,2),l=t=>{var e=Ae();tn(et(e),(()=>S().icon),((t,e)=>{e(t,{})})),De(t,e)},a=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"success-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"error-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"warning-icon",{},null),De(t,n)},i=t=>{var n=Ae(),r=et(n),o=t=>{var n=Ae();Qe(et(n),e,"info-icon",{},null),De(t,n)};He(r,(t=>{"info"===ce(f)&&t(o)}),!0),De(t,n)};He(r,(t=>{"warning"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(r,(t=>{"error"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(r,(t=>{"success"===ce(f)?t(o):t(i,!1)}),!0),De(t,n)};He(i,(t=>{S().icon?t(l):t(a,!1)})),De(t,n)};He(r,(t=>{("default"!==ce(f)||S().icon||S().promise)&&t(o)}));var i=nt(r,2),l=tt(i),a=t=>{var e=gr(),n=tt(e),r=t=>{var e=Ae();tn(et(e),(()=>S().title),((t,e)=>{e(t,Ln((()=>S().componentProps)))})),De(t,e)},o=t=>{var e=ze();ht((()=>We(e,S().title))),De(t,e)};He(n,(t=>{"string"!=typeof S().title?t(r):t(o,!1)})),ht((t=>on(e,1,nn(t))),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.title,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.title)}],ot),De(t,e)};He(l,(t=>{S().title&&t(a)}));var s=nt(l,2),u=t=>{var e=mr(),n=tt(e),r=t=>{var e=Ae();tn(et(e),(()=>S().description),((t,e)=>{e(t,Ln((()=>S().componentProps)))})),De(t,e)},o=t=>{var e=ze();ht((()=>We(e,S().description))),De(t,e)};He(n,(t=>{"string"!=typeof S().description?t(r):t(o,!1)})),ht((t=>on(e,1,nn(t))),[()=>{var t,e;return sr(F(),ce(p),null==(t=R())?void 0:t.description,null==(e=S().classes)?void 0:e.description)}],ot),De(t,e)};He(s,(t=>{S().description&&t(u)}));var c=nt(i,2),d=t=>{var e=yr(),n=tt(e);ht((t=>{sn(e,"style",A()),on(e,1,nn(t)),We(n,S().cancel.label)}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.cancelButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.cancelButton)}],ot),Ee("click",e,(()=>{var t;lt(),(null==(t=S().cancel)?void 0:t.onClick)&&S().cancel.onClick()})),De(t,e)};He(c,(t=>{S().cancel&&t(d)}));var v=nt(c,2),h=t=>{var e=wr(),n=tt(e);ht((t=>{sn(e,"style",L()),on(e,1,nn(t)),We(n,S().action.label)}),[()=>{var t,e,n;return sr(null==(t=R())?void 0:t.actionButton,null==(n=null==(e=S())?void 0:e.classes)?void 0:n.actionButton)}],ot),Ee("click",e,(t=>{var e;null==(e=S().action)||e.onClick(t),t.defaultPrevented||lt()})),De(t,e)};He(v,(t=>{S().action&&t(h)})),De(t,n)};He(mt,(t=>{S().component?t(yt):t(wt,!1)})),kn(dt,(t=>q(J,t)),(()=>ce(J))),ht(((t,e,o)=>{var i;sn(dt,"aria-live",S().important?"assertive":"polite"),on(dt,1,nn(t)),sn(dt,"data-styled",!(S().component||(null==(i=S())?void 0:i.unstyled)||H())),sn(dt,"data-mounted",ce(V)),sn(dt,"data-promise",e),sn(dt,"data-removed",ce(G)),sn(dt,"data-visible",ce(s)),sn(dt,"data-y-position",ce(g)[0]),sn(dt,"data-x-position",ce(g)[1]),sn(dt,"data-index",P()),sn(dt,"data-front",ce(a)),sn(dt,"data-swiping",ce(K)),sn(dt,"data-type",ce(f)),sn(dt,"data-invert",E()),sn(dt,"data-swipe-out",ce(U)),sn(dt,"data-expanded",o),sn(dt,"style",`${n.style} ${S().style}`),fn(dt,"--index",P()),fn(dt,"--toasts-before",P()),fn(dt,"--z-index",On(x,"$toasts",r).length-P()),fn(dt,"--offset",`${ce(G)?ce(Z):ce(X)}px`),fn(dt,"--initial-height",`${ce(Y)}px`)}),[()=>{var t,e,r,o,i,l;return sr(n.class,ce(v),null==(t=R())?void 0:t.toast,null==(r=null==(e=S())?void 0:e.classes)?void 0:r.toast,null==(o=R())?void 0:o[ce(f)],null==(l=null==(i=S())?void 0:i.classes)?void 0:l[ce(f)])},()=>Boolean(S().promise),()=>Boolean(M()||B()&&ce(V))],ot),Ee("pointerdown",dt,(function(t){if(ce(y))return;q(Z,ce(X));const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(q(K,!0),it={x:t.clientX,y:t.clientY})})),Ee("pointerup",dt,(function(){var t,e,n;if(ce(U))return;it=null;const r=Number((null==(t=ce(J))?void 0:t.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(r)>=20)return q(Z,ce(X)),null==(n=(e=S()).onDismiss)||n.call(e,S()),lt(),void q(U,!0);ce(J).style.setProperty("--swipe-amount","0px"),q(K,!1)})),Ee("pointermove",dt,(function(t){if(!it)return;const e=t.clientY-it.y,n=t.clientX-it.x,r=("top"===ce(g)[0]?Math.min:Math.max)(0,e),o="touch"===t.pointerType?10:2;Math.abs(r)>o?ce(J).style.setProperty("--swipe-amount",`${e}px`):Math.abs(n)>o&&(it=null)})),De(t,dt),O(),o()}var $r=Be("<ol></ol>"),kr=Be('<section class="svelte-1fo5d1m"></section>');function Cr(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]),r=An(n,["invert","theme","position","hotkey","containerAriaLabel","richColors","expand","duration","visibleToasts","closeButton","toastOptions","offset","dir"]);N(e,!1);const[o,i]=Tn(),l=()=>On(C,"$toasts",o),a=D(),s=D(),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=qn(e,"invert",8,!1),v=qn(e,"theme",8,"light"),p=qn(e,"position",8,"bottom-right"),h=qn(e,"hotkey",24,(()=>["altKey","KeyT"])),g=qn(e,"containerAriaLabel",8,"Notifications"),m=qn(e,"richColors",8,!1),y=qn(e,"expand",8,!1),w=qn(e,"duration",8,4e3),b=qn(e,"visibleToasts",8,3),x=qn(e,"closeButton",8,!1),_=qn(e,"toastOptions",24,(()=>({}))),$=qn(e,"offset",8,null),k=qn(e,"dir",24,d);const{toasts:C,heights:S,reset:P}=fr;let M=D(!1),I=D(!1),B=D("system"!==(L=v())?L:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?u:c),T=D(),z=null,A=!1;var L;function W(t){A&&!t.currentTarget.contains(t.relatedTarget)&&(A=!1,z&&(z.focus({preventScroll:!0}),z=null))}function F(t){A||(A=!0,z=t.relatedTarget)}!function(t){null===j&&E(),Wn((()=>()=>de(t)))}((()=>{ce(T)&&z&&(z.focus({preventScroll:!0}),z=null,A=!1)})),Wn((()=>{P();const t=t=>{var e,n;h().every((e=>t[e]||t.code===e))&&(q(M,!0),null==(e=ce(T))||e.focus()),"Escape"!==t.code||document.activeElement!==ce(T)&&!(null==(n=ce(T))?void 0:n.contains(document.activeElement))||q(M,!1)};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}})),ft((()=>(pe(p()),l())),(()=>{q(a,Array.from(new Set([p(),...l().filter((t=>t.position)).map((t=>t.position))].filter(Boolean))))})),ft((()=>pe(h())),(()=>{q(s,h().join("+").replace(/Key/g,"").replace(/Digit/g,""))})),ft((()=>l()),(()=>{l().length<=1&&q(M,!1)})),ft((()=>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)}})),ft((()=>pe(v())),(()=>{if("system"!==v()&&q(B,v()),"undefined"!=typeof window){"system"===v()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q(B,u):q(B,c));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{q(B,t?u:c)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}})),vt(),Cn();var R=Ae(),H=et(R),V=t=>{var i=kr();sn(i,"tabindex",-1),Ue(i,5,(()=>ce(a)),Ke,((t,i,a,s)=>{var u=$r();let c;Ue(u,7,(()=>l().filter((t=>!t.position&&0===a||t.position===ce(i)))),(t=>t.id),((t,n,r,o)=>{const l=ot((()=>{var t;return(null==(t=_())?void 0:t.actionButtonStyle)||""})),a=ot((()=>{var t;return(null==(t=_())?void 0:t.cancelButtonStyle)||""})),s=ot((()=>{var t;return(null==(t=_())?void 0:t.class)||""})),u=ot((()=>{var t;return(null==(t=_())?void 0:t.descriptionClass)||""})),c=ot((()=>_().classes||{})),d=ot((()=>{var t;return(null==(t=_())?void 0:t.duration)??w()})),v=ot((()=>_().unstyled||!1));_r(t,{get index(){return ce(r)},get toast(){return ce(n)},get invert(){return f()},get visibleToasts(){return b()},get closeButton(){return x()},get interacting(){return ce(I)},get position(){return ce(i)},get expandByDefault(){return y()},get expanded(){return ce(M)},get actionButtonStyle(){return ce(l)},get cancelButtonStyle(){return ce(a)},get class(){return ce(s)},get descriptionClass(){return ce(u)},get classes(){return ce(c)},get duration(){return ce(d)},get unstyled(){return ce(v)},$$slots:{"loading-icon":(t,r)=>{var o=Ae();Qe(et(o),e,"loading-icon",{},(t=>{const e=ot((()=>"loading"===ce(n).type));!function(t,e){N(e,!1);let n=qn(e,"visible",8);const r=Array(12).fill(0);Cn();var o=ar();Ue(tt(o),5,(()=>r),Ke,((t,e)=>{De(t,lr())})),ht((()=>sn(o,"data-visible",n()))),De(t,o),O()}(t,{get visible(){return ce(e)}})})),De(t,o)},"success-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"success-icon",{},(t=>{ir(t,{type:"success"})})),De(t,r)},"error-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"error-icon",{},(t=>{ir(t,{type:"error"})})),De(t,r)},"warning-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"warning-icon",{},(t=>{ir(t,{type:"warning"})})),De(t,r)},"info-icon":(t,n)=>{var r=Ae();Qe(et(r),e,"info-icon",{},(t=>{ir(t,{type:"info"})})),De(t,r)}}})})),kn(u,(t=>q(T,t)),(()=>ce(T))),ht(((t,e,i)=>{var l;c=un(u,c,{tabIndex:-1,class:n.class,"data-sonner-toaster":!0,"data-theme":ce(B),"data-rich-colors":m(),dir:t,"data-y-position":e,"data-x-position":i,style:n.style,...r},"svelte-1fo5d1m"),fn(u,"--front-toast-height",`${null==(l=On(S,"$heights",o)[0])?void 0:l.height}px`),fn(u,"--offset","number"==typeof $()?`${$()}px`:$()||"32px"),fn(u,"--width","356px"),fn(u,"--gap","14px"),u.dir=u.dir}),[()=>"auto"===k()?d():k(),()=>ce(i).split("-")[0],()=>ce(i).split("-")[1]],ot),Ee("blur",u,W),Ee("focus",u,F),Ee("mouseenter",u,(()=>q(M,!0))),Ee("mousemove",u,(()=>q(M,!0))),Ee("mouseleave",u,(()=>{ce(I)||q(M,!1)})),Ee("pointerdown",u,(()=>q(I,!0))),Ee("pointerup",u,(()=>q(I,!1))),De(t,u)})),ht((()=>sn(i,"aria-label",`${g()} ${ce(s)}`))),De(t,i)};He(H,(t=>{l().length>0&&t(V)})),De(t,R),O(),i()}const Sr=En(!1),Pr=En("https://sdk.playlight.dev");function Mr(t,e){var n;null==(n=e.onClick)||n.call(e,e.game.id),window.open("https://"+e.game.domain,"_blank","noopener")}var Er=Be('<div><p class="uppercase">New</p></div>'),jr=Be('<video playsinline="" loop preload="auto"></video>',2),Ir=Be('<div id="overlay" 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-styo3v"><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 class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-styo3v"></div></div>'),Nr=Be('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');je(["touchstart","touchend","click"]);const Or=new class{constructor(){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,n){let r="/suggestions";return t&&(r+="/"+t),e&&(r+="?page="+e),n&&(r+="&without="+n),await this.request(r)}async getCurrentGameInfo(){if(this.currentGame)return this.currentGame;let t="/game-by-domain/"+window.location.hostname;return this.currentGame=await this.request(t),{...this.currentGame}}async trackOpen(){const t=window.location.hostname;await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=window.location.hostname;await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}};function Br(t){const e=t-1;return e*e*e+1}function Tr(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-10*t)+1}function zr(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=Br}=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,w=(h-m)*v,b=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(y*y+w*w)):i,easing:l,css:(t,e)=>`transform: ${s} translate(${e*y}px, ${e*w}px) scale(${t+e*b}, ${t+e*x});`}}var Ar=(t,e,n)=>{q(e,""),q(n,!ce(n))},Dr=Be('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),Lr=Be('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),qr=(t,e,n,r)=>{e(n),q(r,!1)},Wr=Be("<button> </button>"),Fr=Be('<div class="space-y-1 p-1"></div>'),Rr=Be('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><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>'),Hr=Be('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate"> </span> <!></button> <span>games?</span></h1> <!></div>');function Vr(t,e){N(e,!0);let n,r=qn(e,"categories",19,(()=>[])),o=qn(e,"selectedCategory",15),i=z(!1),l=rt((()=>o()||(r().length>0?r()[0]:"..."))),a=z(""),s=z(void 0),u=rt((()=>ce(a)?r().filter((t=>t.toLowerCase().includes(ce(a).toLowerCase()))):r()));const c=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d,f=z(H(c[0]));Wn((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));q(f,H(c[t])),d=t}));var v=Hr();Ee("click",K,(function(t){ce(s)&&!ce(s).contains(t.target)&&n&&!n.contains(t.target)&&q(i,!1)}));var p=tt(v),h=tt(p),g=tt(h),m=nt(h,2);m.__click=[Ar,a,i];var y=tt(m),w=tt(y),b=nt(y,2);const x=rt((()=>ce(i)?"rotate-180 transform":""));!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({name:"chevron-down"},(()=>n),{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(b,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${ce(x)??""} transition-transform duration-200`}}),kn(m,(t=>n=t),(()=>n));var _=nt(p,2),$=t=>{var e=Rr(),n=tt(e),l=tt(n),c=tt(l);!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({name:"search"},(()=>n),{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(c),{size:18,class:"text-muted-foreground"});var d=nt(c,2),f=tt(nt(n,2)),v=t=>{De(t,Dr())},p=t=>{var e=Ae(),n=et(e),r=t=>{De(t,Lr())},l=t=>{var e=Fr();Ue(e,28,(()=>ce(u)),(t=>t),((t,e)=>{var n=Wr();n.__click=[qr,o,e,i];var r,l,a,s,u,c,d,f,v=tt(n);ht((()=>{on(n,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o()!=e?"hover:bg-muted-foreground/20":"")??""} ${(o()==e?"bg-white text-black":"text-white")??""}`),We(v,e)})),r=n,l=()=>zr,a=()=>({duration:150}),f=null,(d=Ve).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=bn(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,De(t,n)})),De(t,e)};He(n,(t=>{0===ce(u).length?t(r):t(l,!1)}),!0),De(t,e)};He(f,(t=>{0===r().length?t(v):t(p,!1)})),kn(e,(t=>q(s,t)),(()=>ce(s))),function(t,e,n=e){var r=B();(function(t,e,n,r=n){t.addEventListener(e,(()=>Ce(n)));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),ke||(ke=!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=xn(t)?_n(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==de(e)&&t.value&&n(xn(t)?_n(t.value):t.value),pt((()=>{var n=e();xn(t)&&n===_n(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")}))}(d,(()=>ce(a)),(t=>q(a,t))),wn(3,e,(()=>Xn),(()=>({y:-5,duration:250}))),De(t,e)};He(_,(t=>{ce(i)&&t($)})),ht((()=>{We(g,ce(f)),We(w,ce(l))})),wn(3,v,(()=>tr),(()=>({duration:600,delay:50,easing:Tr,start:.95}))),De(t,v),O()}je(["click"]);var Gr=(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),q(e,!ce(e))},Kr=(t,e)=>Bn(Sr,!1),Ur=Be('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Zr=Be('<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>'),Yr=Be('<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>'),Jr=Be('<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"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><button class="cursor-pointer truncate text-sm text-nowrap text-white opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 p-1 px-2"> </p></button> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');function Xr(t,e){N(e,!0);const[n,r]=Tn();let o,i=z(void 0),l=z(!0),a=z(!1),s=z(void 0),u=z(H([])),c=z(H([])),d=z(!0),f=z(1),v=z(!0),p=z(void 0),h=z(!1);async function g(){if(!(ce(l)&&ce(f)>1||ce(a)))try{1===ce(f)?q(l,!0):q(a,!0);const t=ce(h)?null:ce(i),e=await Or.getSuggestions(t,ce(f),window.location.hostname),n=(null==e?void 0:e.games)||[],r=n.filter((t=>!ce(u).some((e=>e.id===t.id))));q(u,H([...ce(u),...r])),n.length<10?!ce(h)&&ce(i)?(q(h,!0),q(f,1),setTimeout((()=>g()),100)):q(v,!1):q(f,ce(f)+1)}catch(t){console.error(t),vr.error("Failed to load games: "+t)}finally{q(l,!1),q(a,!1),ce(v)&&ce(p)&&setTimeout((()=>{const t=ce(p).getBoundingClientRect();!(t.top>=-200&&t.left>=0&&t.bottom<=window.innerHeight+200&&t.right<=window.innerWidth)||ce(l)||ce(a)||g()}),150)}}Wn((()=>(q(d,!Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))),o=new IntersectionObserver((t=>{t[0].isIntersecting&&ce(v)&&!ce(l)&&!ce(a)&&g()}),{rootMargin:"200px"}),()=>null==o?void 0:o.disconnect()))),Wn((async()=>{const t=await Or.getCurrentGameInfo();q(s,H(null==t?void 0:t.category)),await async function(){var t,e,n,r;q(c,H(await Or.getCategories())),!ce(i)&&(null==(t=ce(c))?void 0:t.length)>0&&q(i,H(ce(s)&&(null==(e=ce(c))?void 0:e.includes(ce(s)))?ce(s):null==(r=ce(c))?void 0:r[(null==(n=ce(c))?void 0:n.length)-1]))}()})),ct((()=>{ce(i)&&(q(u,H([])),q(f,1),q(v,!0),q(h,!1),q(l,!0),setTimeout((async()=>{await g(),ce(u).length<10&&await g()}),100))})),ct((()=>{ce(p)&&o&&o.observe(ce(p))}));var m=Jr();Ee("keydown",K,(t=>{"Escape"==t.key&&Bn(Sr,!1)}));var y=tt(m),w=tt(y),b=tt(w),x=tt(nt(w,2));x.__click=[Gr,d];var _=tt(x),$=tt(_),k=nt(x,2);k.__click=[Kr,()=>On(Sr,"$discoveryOpen",n)],function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({name:"x"},(()=>n),{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(t,n)=>{var r=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(k),{size:24});var C=nt(y,2);Vr(tt(C),{get categories(){return ce(c)},get selectedCategory(){return ce(i)},set selectedCategory(t){q(i,H(t))}});var S=nt(C,2),P=tt(S),M=t=>{var e=Ur();Vn(tt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.5}),De(t,e)},E=t=>{var e=Ae(),n=et(e),r=t=>{De(t,Zr())},o=t=>{var e=Yr(),n=tt(e);Ue(n,17,(()=>ce(u)),Ke,((e,n)=>{!function(e,n){N(n,!0);const[r,o]=Tn();let i=z(!1),l=z(void 0),a=z(!1),s=z(!1),u=z(!1),c=z(!1);function d(){ce(i)||function(e,n=1){try{const t=new Audio(e);t.volume=n,t.play()}catch(t){console.error("Error playing sound:",t)}}(On(Pr,"$projectUrl",r)+"/static/sounds/hover-selection.ogg",.25),q(i,!0),ce(l)&&n.game.cover_video_url&&(q(c,!0),ce(l).play().catch((t=>console.error("Video play error:",t))))}function f(){q(i,!1),ce(l)&&ce(a)&&ce(l).pause()}var v=Nr();v.__touchstart=d,v.__touchend=f,v.__click=[Mr,n];var p=tt(v),h=t=>{var e=Er();let n;ht((()=>n=on(e,1,"bg-foreground text-background absolute top-4 right-4 z-13 px-2 py-0.5 font-bold transition-opacity",null,n,{"opacity-0":ce(i)}))),De(t,e)};He(p,(t=>{var e;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(e=n.game)?void 0:e.created_at)&&t(h)}));var g=nt(p,2),m=t=>{var e=jr();let r;e.muted=!0,kn(e,(t=>q(l,t)),(()=>ce(l))),ht((()=>{sn(e,"src",n.game.cover_video_url),r=on(e,1,"absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0",null,r,{"opacity-100":ce(i)&&ce(a)&&n.game.cover_video_url})})),Ee("loadeddata",e,(()=>{q(a,!0),q(c,!1)})),De(t,e)};He(g,(t=>{n.game.cover_video_url&&t(m)}));var y=nt(g,2);let w;var b=nt(y,2),x=t=>{var e=Ir(),r=tt(e),o=tt(r),i=tt(o),l=tt(nt(o,2));ht((()=>{We(i,n.game.name),We(l,n.game.description||"No description.")})),wn(3,e,(()=>Qn)),De(t,e)};He(b,(t=>{ce(i)&&t(x)}));var _=nt(b,2);let $;ht((()=>{on(v,1,`bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(ce(s)?"":"animate-pulse")??""}`,"svelte-styo3v"),sn(y,"src",n.game.cover_image_url),w=on(y,1,"absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-styo3v",null,w,{"opacity-100":ce(s)&&(!ce(i)||!ce(a)||!n.game.cover_video_url)}),sn(_,"src",n.game.logo_url),$=on(_,1,"absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-styo3v",null,$,{"opacity-100":ce(u)})})),Ee("mouseenter",v,d),Ee("focus",v,d),Ee("mouseleave",v,f),Ee("blur",v,f),Ee("touchcancel",v,f),Ee("load",y,(()=>{q(s,!0)})),Ee("load",_,(()=>{q(u,!0)})),De(e,v),O(),o()}(e,{get game(){return ce(n)},onClick:()=>Or.trackClick(ce(n).id)})}));var r=nt(n,2),o=tt(r),i=t=>{Vn(t,{class:"animate-spin opacity-75",size:30,strokeWidth:2.5})};He(o,(t=>{ce(a)&&t(i)})),kn(r,(t=>q(p,t)),(()=>ce(p))),De(t,e)};He(n,(t=>{0!==ce(u).length||ce(l)?t(o,!1):t(r)}),!0),De(t,e)};He(P,(t=>{ce(l)&&0===ce(u).length?t(M):t(E,!1)}));var j=tt(nt(S,2));!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({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=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(nt(tt(j)),{size:14,style:"margin-top: 1px;"}),ht((()=>{sn(b,"src",On(Pr,"$projectUrl",n)+"/static/images/logo-white-small.png"),We($,ce(d)?"Ignore exit intent":"Trigger on exit intent")})),wn(3,m,(()=>Jn),(()=>({duration:250}))),De(t,m),O(),r()}je(["click"]);var Qr=Be('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');je(["mouseover"]);var to=Be("<!> <!> <!> <!>",1);function eo(t,e){var n,r,o,i;N(e,!0);const[l,a]=Tn(),s=()=>On(Sr,"$discoveryOpen",l);let u=H(null==(r=null==(n=e.config)?void 0:n.button)?void 0:r.position),c=H(null==(i=null==(o=e.config)?void 0:o.button)?void 0:i.visible);function d(){Bn(Sr,!0),Or.trackOpen()}var f=to(),v=et(f);!function(t,e){N(e,!0);let n=qn(e,"position",3,"bottom-right"),r=qn(e,"visible",3,!0);var o=Ae(),i=et(o),l=t=>{var r=Kn();r.__click=[Gn,e];var o=tt(r);!function(t,e){const n=An(e,["children","$$slots","$$events","$$legacy"]);Hn(t,Ln({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=Ae();Qe(et(r),e,"default",{},null),De(t,r)},$$slots:{default:!0}}))}(tt(o),{size:26,strokeWidth:1.75,class:"z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"}),ht((()=>on(r,1,`fixed ${("bottom-left"==n()?"bottom-4 left-4":"bottom-right"==n()?"right-4 bottom-4":"")??""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`,"svelte-1j97rta"))),De(t,r)};He(i,(t=>{r()&&t(l)})),De(t,o),O()}(v,{get position(){return u},get visible(){return c},onClick:d});var p=nt(v,2),h=t=>{Xr(t,{})};He(p,(t=>{s()&&t(h)}));var g=nt(p,2);const m=rt((()=>{var t,n;return null==(n=null==(t=e.config)?void 0:t.exitIntent)?void 0:n.enabled}));!function(t,e){N(e,!0);let n,r=qn(e,"enabled",3,!0),o=!1;Wn((()=>{"undefined"!=typeof window&&(n=window.innerHeight)}));var i=Qr();Ee("mouseleave",K,(()=>{o=!1})),Ee("mousemove",K,(t=>{const e=t.clientY;if(!o)return o=!0,void(n=e);n=e})),i.__mouseover=t=>{var i;const l=t.clientY;l<n&&o&&r()&&!localStorage.getItem("playlight_exit_intent_disabled_by_user")&&(null==(i=e.onIntent)||i.call(e)),n=l},De(t,i),O()}(g,{get enabled(){return ce(m)},onIntent:()=>{s()||d()}}),Cr(nt(g,2),{}),De(t,f),O(),a()}const no={button:{position:"bottom-right",visible:!0},exitIntent:{enabled:!0}};let ro={...no};function oo(t={}){return ro=io(no,t),ro}function io(t,e){const n={...t};return lo(t)&&lo(e)&&Object.keys(e).forEach((r=>{lo(e[r])?r in t?n[r]=io(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}function lo(t){return t&&"object"==typeof t&&!Array.isArray(t)}const ao=new class{constructor(){this.container=null,this.app=null,this.isInitialized=!1,this.config=null,this.api=Or}async init(t={}){if(!this.isInitialized)return this.config=oo(t),this.container=document.createElement("div"),this.container.id="playlight-sdk-container",document.body.appendChild(this.container),this.app=function(t,e){return function(t,{target:e,anchor:r,props:i={},events:l,context:a,intro:s=!0}){!function(){if(void 0===G){G=window,K=document,U=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype;Z=o(e,"firstChild").get,Y=o(e,"nextSibling").get,t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}();var u=new Set,c=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!u.has(r)){u.add(r);var o=_e(r);e.addEventListener(r,Ie,{passive:o});var i=Fe.get(r);void 0===i?(document.addEventListener(r,Ie,{passive:o}),Fe.set(r,1)):Fe.set(r,i+1)}}};c(n(Se)),Pe.add(c);var d=void 0,f=function(t){const e=st(64,t,!0);return(t={})=>new Promise((n=>{t.outro?_t(e,(()=>{bt(e),n(void 0)})):(bt(e),n(void 0))}))}((()=>{var n=r??e.appendChild(J());return mt((()=>{a&&(N({}),j.c=a),l&&(i.$$events=l),Le=s,d=t(n,i)||{},Le=!0,a&&O()})),()=>{var t;for(var o of u){e.removeEventListener(o,Ie);var i=Fe.get(o);0==--i?(document.removeEventListener(o,Ie),Fe.delete(o)):Fe.set(o,i)}Pe.delete(c),n!==r&&(null==(t=n.parentNode)||t.removeChild(n))}}));return Re.set(d,f),d}(t,e)}(eo,{target:this.container,props:{config:this.config}}),await this.api.getCurrentGameInfo(),this.isInitialized=!0,this}setDiscovery(t){this.isInitialized&&(Sr.set(t),jn(Sr)&&Or.trackOpen())}};return"undefined"!=typeof window&&(window.playlightSDK=ao),ao}();
|
|
23
|
+
//# sourceMappingURL=playlight-sdk.iife.js.map
|