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