@playpilot/tpi 8.5.9 → 8.5.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.html +3 -1
- package/dist/editorial.mount.js +2 -2
- package/dist/link-injections.js +2 -2
- package/dist/mount.js +2 -2
- package/package.json +1 -1
- package/src/main.ts +6 -2
- package/src/mount.ts +1 -1
package/dist/editorial.mount.js
CHANGED
|
@@ -2,11 +2,11 @@ var K1=Object.defineProperty;var Ms=Re=>{throw TypeError(Re)};var Y1=(Re,Ne,Ve)=
|
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(Re);const Ne=!1;var Ve=Array.isArray,Qa=Array.prototype.indexOf,Kn=Array.from,Bs=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,pl=Object.getOwnPropertyDescriptors,Fs=Object.prototype,Hs=Array.prototype,Yn=Object.getPrototypeOf,fl=Object.isExtensible;function Xi(t){return typeof t=="function"}const bt=()=>{};function Vs(t){return typeof(t==null?void 0:t.then)=="function"}function Us(t){return t()}function Zn(t){for(var e=0;e<t.length;e++)t[e]()}function hl(){var t,e,i=new Promise((a,n)=>{t=a,e=n});return{promise:i,resolve:t,reject:e}}function $a(t,e,i=!1){return t===void 0?i?e():e:t}function ka(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const i=[];for(const a of t)if(i.push(a),i.length===e)break;return i}const at=2,Jn=4,en=8,gl=1<<24,Ot=16,ai=32,Ci=64,tn=128,It=512,lt=1024,ut=2048,ni=4096,ht=8192,ri=16384,an=32768,Bt=65536,ml=1<<17,Xn=1<<18,Qi=1<<19,yl=1<<20,Sa=32768,Qn=1<<21,$n=1<<22,gi=1<<23,Ft=Symbol("$state"),bl=Symbol("legacy props"),Ws=Symbol(""),$i=new class extends Error{constructor(){super(...arguments);Nt(this,"name","StaleReactionError");Nt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function er(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Gs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ks(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ys(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Zs(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Js(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xs(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Qs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function $s(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ec(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function tc(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const _l=1,xl=2,wl=4,ic=8,ac=16,nc=1,rc=2,lc=4,oc=8,sc=16,cc=1,dc=2,uc=4,vc=1,pc=2,Xe=Symbol(),fc="http://www.w3.org/1999/xhtml",hc="http://www.w3.org/2000/svg",gc="@attach";function mc(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function yc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function kl(t){return t===this.v}function Sl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Tl(t){return!Sl(t,this.v)}let ea=!1,bc=!1;function _c(){ea=!0}let Me=null;function ta(t){Me=t}function tr(t){return El().get(t)}function ir(t,e){return El().set(t,e),e}function oe(t,e=!1,i){Me={p:Me,i:!1,c:null,e:null,s:t,x:null,l:ea&&!e?{s:null,u:null,$:[]}:null}}function se(t){var e=Me,i=e.e;if(i!==null){e.e=null;for(var a of i)Xl(a)}return t!==void 0&&(e.x=t),e.i=!0,Me=e.p,t??{}}function Ii(){return!ea||Me!==null&&Me.l===null}function El(t){return Me===null&&er(),Me.c??(Me.c=new Map(xc(Me)||void 0))}function xc(t){let e=t.p;for(;e!==null;){const i=e.c;if(i!==null)return i;e=e.p}return null}let ji=[];function Pl(){var t=ji;ji=[],Zn(t)}function li(t){if(ji.length===0&&!aa){var e=ji;queueMicrotask(()=>{e===ji&&Pl()})}ji.push(t)}function wc(){for(;ji.length>0;)Pl()}function Cl(t){var e=Ce;if(e===null)return Te.f|=gi,t;if(e.f&an)ia(t,e);else{if(!(e.f&tn))throw t;e.b.error(t)}}function ia(t,e){for(;e!==null;){if(e.f&tn)try{e.b.error(t);return}catch(i){t=i}e=e.parent}throw t}const nn=new Set;let we=null,Ta=null,Ge=null,_t=[],rn=null,ar=!1,aa=!1;const Dn=class Dn{constructor(){be(this,Ze);Nt(this,"committed",!1);Nt(this,"current",new Map);Nt(this,"previous",new Map);be(this,ga,new Set);be(this,ma,new Set);be(this,Ui,0);be(this,Wi,0);be(this,Wa,null);be(this,ya,[]);be(this,ba,[]);Nt(this,"skipped_effects",new Set);Nt(this,"is_fork",!1)}is_deferred(){return this.is_fork||O(this,Wi)>0}process(e){var a;_t=[],Ta=null,this.apply();var i={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)Oe(this,Ze,cl).call(this,n,i);this.is_fork||Oe(this,Ze,qs).call(this),this.is_deferred()?(Oe(this,Ze,Ji).call(this,i.effects),Oe(this,Ze,Ji).call(this,i.render_effects),Oe(this,Ze,Ji).call(this,i.block_effects)):(Ta=this,we=null,zl(i.render_effects),zl(i.effects),Ta=null,(a=O(this,Wa))==null||a.resolve()),Ge=null}capture(e,i){this.previous.has(e)||this.previous.set(e,i),e.f&gi||(this.current.set(e,e.v),Ge==null||Ge.set(e,e.v))}activate(){we=this,this.apply()}deactivate(){we===this&&(we=null,Ge=null)}flush(){if(this.activate(),_t.length>0){if(jl(),we!==null&&we!==this)return}else O(this,Ui)===0&&this.process([]);this.deactivate()}discard(){for(const e of O(this,ma))e(this);O(this,ma).clear()}increment(e){he(this,Ui,O(this,Ui)+1),e&&he(this,Wi,O(this,Wi)+1)}decrement(e){he(this,Ui,O(this,Ui)-1),e&&he(this,Wi,O(this,Wi)-1),this.revive()}revive(){for(const e of O(this,ya))ot(e,ut),zi(e);for(const e of O(this,ba))ot(e,ni),zi(e);he(this,ya,[]),he(this,ba,[]),this.flush()}oncommit(e){O(this,ga).add(e)}ondiscard(e){O(this,ma).add(e)}settled(){return(O(this,Wa)??he(this,Wa,hl())).promise}static ensure(){if(we===null){const e=we=new Dn;nn.add(we),aa||Dn.enqueue(()=>{we===e&&e.flush()})}return we}static enqueue(e){li(e)}apply(){}};ga=new WeakMap,ma=new WeakMap,Ui=new WeakMap,Wi=new WeakMap,Wa=new WeakMap,ya=new WeakMap,ba=new WeakMap,Ze=new WeakSet,cl=function(e,i){var u;e.f^=lt;for(var a=e.first;a!==null;){var n=a.f,r=(n&(ai|Ci))!==0,o=r&&(n<)!==0,s=o||(n&ht)!==0||this.skipped_effects.has(a);if(a.f&tn&&((u=a.b)!=null&&u.is_pending())&&(i={parent:i,effect:a,effects:[],render_effects:[],block_effects:[]}),!s&&a.fn!==null){r?a.f^=lt:n&Jn?i.effects.push(a):Aa(a)&&(a.f&Ot&&i.block_effects.push(a),La(a));var c=a.first;if(c!==null){a=c;continue}}var d=a.parent;for(a=a.next;a===null&&d!==null;)d===i.effect&&(Oe(this,Ze,Ji).call(this,i.effects),Oe(this,Ze,Ji).call(this,i.render_effects),Oe(this,Ze,Ji).call(this,i.block_effects),i=i.parent),a=d.next,d=d.parent}},Ji=function(e){for(const i of e)(i.f&ut?O(this,ya):O(this,ba)).push(i),Oe(this,Ze,dl).call(this,i.deps),ot(i,lt)},dl=function(e){if(e!==null)for(const i of e)!(i.f&at)||!(i.f&Sa)||(i.f^=Sa,Oe(this,Ze,dl).call(this,i.deps))},qs=function(){if(O(this,Wi)===0){for(const e of O(this,ga))e();O(this,ga).clear()}O(this,Ui)===0&&Oe(this,Ze,Ds).call(this)},Ds=function(){var r;if(nn.size>1){this.previous.clear();var e=Ge,i=!0,a={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const o of nn){if(o===this){i=!1;continue}const s=[];for(const[d,u]of this.current){if(o.current.has(d))if(i&&u!==o.current.get(d))o.current.set(d,u);else continue;s.push(d)}if(s.length===0)continue;const c=[...o.current.keys()].filter(d=>!this.current.has(d));if(c.length>0){var n=_t;_t=[];const d=new Set,u=new Map;for(const v of s)Al(v,c,d,u);if(_t.length>0){we=o,o.apply();for(const v of _t)Oe(r=o,Ze,cl).call(r,v,a);o.deactivate()}_t=n}}we=null,Ge=e}this.committed=!0,nn.delete(this)};let Ht=Dn;function Il(t){var e=aa;aa=!0;try{for(var i;;){if(wc(),_t.length===0&&(we==null||we.flush(),_t.length===0))return rn=null,i;jl()}}finally{aa=e}}function jl(){var t=_i;ar=!0;var e=null;try{var i=0;for(on(!0);_t.length>0;){var a=Ht.ensure();if(i++>1e3){var n,r;kc()}a.process(_t),mi.clear()}}finally{ar=!1,on(t),rn=null}}function kc(){try{Js()}catch(t){ia(t,rn)}}let jt=null;function zl(t){var e=t.length;if(e!==0){for(var i=0;i<e;){var a=t[i++];if(!(a.f&(ri|ht))&&Aa(a)&&(jt=new Set,La(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?io(a):a.fn=null),(jt==null?void 0:jt.size)>0)){mi.clear();for(const n of jt){if(n.f&(ri|ht))continue;const r=[n];let o=n.parent;for(;o!==null;)jt.has(o)&&(jt.delete(o),r.push(o)),o=o.parent;for(let s=r.length-1;s>=0;s--){const c=r[s];c.f&(ri|ht)||La(c)}}jt.clear()}}jt=null}}function Al(t,e,i,a){if(!i.has(t)&&(i.add(t),t.reactions!==null))for(const n of t.reactions){const r=n.f;r&at?Al(n,e,i,a):r&($n|Ot)&&!(r&ut)&&Ll(n,e,a)&&(ot(n,ut),zi(n))}}function Ll(t,e,i){const a=i.get(t);if(a!==void 0)return a;if(t.deps!==null)for(const n of t.deps){if(e.includes(n))return!0;if(n.f&at&&Ll(n,e,i))return i.set(n,!0),!0}return i.set(t,!1),!1}function zi(t){for(var e=rn=t;e.parent!==null;){e=e.parent;var i=e.f;if(ar&&e===Ce&&i&Ot&&!(i&Xn))return;if(i&(Ci|ai)){if(!(i<))return;e.f^=lt}}_t.push(e)}function Ml(t){let e=0,i=Ut(0),a;return()=>{Ia()&&(l(i),ln(()=>(e===0&&(a=wt(()=>t(()=>yi(i)))),e+=1,()=>{li(()=>{e-=1,e===0&&(a==null||a(),a=void 0,yi(i))})})))}}var Sc=Bt|Qi|tn;function ql(t,e,i){new Tc(t,e,i)}class Tc{constructor(e,i,a){be(this,et);Nt(this,"parent");be(this,Tt,!1);be(this,Et);be(this,ol,null);be(this,Jt);be(this,Gi);be(this,Xt);be(this,Pt,null);be(this,ft,null);be(this,Qt,null);be(this,pi,null);be(this,ki,null);be(this,Ki,0);be(this,Si,0);be(this,Yi,!1);be(this,Ti,null);be(this,Rn,Ml(()=>(he(this,Ti,Ut(O(this,Ki))),()=>{he(this,Ti,null)})));he(this,Et,e),he(this,Jt,i),he(this,Gi,a),this.parent=Ce.b,he(this,Tt,!!O(this,Jt).pending),he(this,Xt,si(()=>{Ce.b=this;{var n=Oe(this,et,ul).call(this);try{he(this,Pt,vt(()=>a(n)))}catch(r){this.error(r)}O(this,Si)>0?Oe(this,et,Gn).call(this):he(this,Tt,!1)}return()=>{var r;(r=O(this,ki))==null||r.remove()}},Sc))}is_pending(){return O(this,Tt)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!O(this,Jt).pending}update_pending_count(e){Oe(this,et,vl).call(this,e),he(this,Ki,O(this,Ki)+e),O(this,Ti)&&oi(O(this,Ti),O(this,Ki))}get_effect_pending(){return O(this,Rn).call(this),l(O(this,Ti))}error(e){var i=O(this,Jt).onerror;let a=O(this,Jt).failed;if(O(this,Yi)||!i&&!a)throw e;O(this,Pt)&&(nt(O(this,Pt)),he(this,Pt,null)),O(this,ft)&&(nt(O(this,ft)),he(this,ft,null)),O(this,Qt)&&(nt(O(this,Qt)),he(this,Qt,null));var n=!1,r=!1;const o=()=>{if(n){yc();return}n=!0,r&&tc(),Ht.ensure(),he(this,Ki,0),O(this,Qt)!==null&&na(O(this,Qt),()=>{he(this,Qt,null)}),he(this,Tt,this.has_pending_snippet()),he(this,Pt,Oe(this,et,Wn).call(this,()=>(he(this,Yi,!1),vt(()=>O(this,Gi).call(this,O(this,Et)))))),O(this,Si)>0?Oe(this,et,Gn).call(this):he(this,Tt,!1)};var s=Te;try{pt(null),r=!0,i==null||i(e,o),r=!1}catch(c){ia(c,O(this,Xt)&&O(this,Xt).parent)}finally{pt(s)}a&&li(()=>{he(this,Qt,Oe(this,et,Wn).call(this,()=>{Ht.ensure(),he(this,Yi,!0);try{return vt(()=>{a(O(this,Et),()=>e,()=>o)})}catch(c){return ia(c,O(this,Xt).parent),null}finally{he(this,Yi,!1)}}))})}}Tt=new WeakMap,Et=new WeakMap,ol=new WeakMap,Jt=new WeakMap,Gi=new WeakMap,Xt=new WeakMap,Pt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,pi=new WeakMap,ki=new WeakMap,Ki=new WeakMap,Si=new WeakMap,Yi=new WeakMap,Ti=new WeakMap,Rn=new WeakMap,et=new WeakSet,Z1=function(){try{he(this,Pt,vt(()=>O(this,Gi).call(this,O(this,Et))))}catch(e){this.error(e)}he(this,Tt,!1)},J1=function(){const e=O(this,Jt).pending;e&&(he(this,ft,vt(()=>e(O(this,Et)))),Ht.enqueue(()=>{var i=Oe(this,et,ul).call(this);he(this,Pt,Oe(this,et,Wn).call(this,()=>(Ht.ensure(),vt(()=>O(this,Gi).call(this,i))))),O(this,Si)>0?Oe(this,et,Gn).call(this):(na(O(this,ft),()=>{he(this,ft,null)}),he(this,Tt,!1))}))},ul=function(){var e=O(this,Et);return O(this,Tt)&&(he(this,ki,zt()),O(this,Et).before(O(this,ki)),e=O(this,ki)),e},Wn=function(e){var i=Ce,a=Te,n=Me;Kt(O(this,Xt)),pt(O(this,Xt)),ta(O(this,Xt).ctx);try{return e()}catch(r){return Cl(r),null}finally{Kt(i),pt(a),ta(n)}},Gn=function(){const e=O(this,Jt).pending;O(this,Pt)!==null&&(he(this,pi,document.createDocumentFragment()),O(this,pi).append(O(this,ki)),ro(O(this,Pt),O(this,pi))),O(this,ft)===null&&he(this,ft,vt(()=>e(O(this,Et))))},vl=function(e){var i;if(!this.has_pending_snippet()){this.parent&&Oe(i=this.parent,et,vl).call(i,e);return}he(this,Si,O(this,Si)+e),O(this,Si)===0&&(he(this,Tt,!1),O(this,ft)&&na(O(this,ft),()=>{he(this,ft,null)}),O(this,pi)&&(O(this,Et).before(O(this,pi)),he(this,pi,null)))};let Ai=null;function Dl(t){Ai=t}function qe(t,e){return e}function Ec(t,e,i){for(var a=[],n=e.length,r=0;r<n;r++)cr(e[r].e,a,!0);ao(a,()=>{var o=a.length===0&&i!==null;if(o){var s=i,c=s.parentNode;qc(c),c.append(s),t.items.clear(),Vt(t,e[0].prev,e[n-1].next)}for(var d=0;d<n;d++){var u=e[d];o||(t.items.delete(u.k),Vt(t,u.prev,u.next)),nt(u.e,!o)}t.first===e[0]&&(t.first=e[0].prev)})}function je(t,e,i,a,n,r=null){var o=t,s=new Map,c=null,d=(e&wl)!==0,u=(e&_l)!==0,v=(e&xl)!==0;if(d){var p=t;o=p.appendChild(zt())}var f=null,b=rr(()=>{var C=i();return Ve(C)?C:C==null?[]:Kn(C)}),h,_=!0;function g(){Pc(w,h,o,e,a),f!==null&&(h.length===0?(f.fragment?(o.before(f.fragment),f.fragment=null):dr(f.effect),k.first=f.effect):na(f.effect,()=>{f=null}))}var k=si(()=>{h=l(b);for(var C=h.length,R=new Set,I=we,z=null,U=Kl(),D=0;D<C;D+=1){var P=h[D],E=a(P,D),j=_?null:s.get(E);j?(u&&oi(j.v,P),v?oi(j.i,D):j.i=D,U&&I.skipped_effects.delete(j.e)):(j=Cc(_?o:null,z,P,E,D,n,e,i),_&&(j.o=!0,z===null?c=j:z.next=j,z=j),s.set(E,j)),R.add(E)}if(C===0&&r&&!f)if(_)f={fragment:null,effect:vt(()=>r(o))};else{var q=document.createDocumentFragment(),F=zt();q.append(F),f={fragment:q,effect:vt(()=>r(F))}}if(!_)if(U){for(const[Y,K]of s)R.has(Y)||I.skipped_effects.add(K.e);I.oncommit(g),I.ondiscard(()=>{})}else g();l(b)}),w={effect:k,flags:e,items:s,first:c};_=!1}function Pc(t,e,i,a,n){var P,E,j,q;var r=(a&ic)!==0,o=e.length,s=t.items,c=t.first,d,u=null,v,p=[],f=[],b,h,_,g;if(r)for(g=0;g<o;g+=1)b=e[g],h=n(b,g),_=s.get(h),_.o&&((P=_.a)==null||P.measure(),(v??(v=new Set)).add(_));for(g=0;g<o;g+=1){if(b=e[g],h=n(b,g),_=s.get(h),t.first??(t.first=_),!_.o){_.o=!0;var k=u?u.next:c;Vt(t,u,_),Vt(t,_,k),nr(_,k,i),u=_,p=[],f=[],c=u.next;continue}if(_.e.f&ht&&(dr(_.e),r&&((E=_.a)==null||E.unfix(),(v??(v=new Set)).delete(_))),_!==c){if(d!==void 0&&d.has(_)){if(p.length<f.length){var w=f[0],C;u=w.prev;var R=p[0],I=p[p.length-1];for(C=0;C<p.length;C+=1)nr(p[C],w,i);for(C=0;C<f.length;C+=1)d.delete(f[C]);Vt(t,R.prev,I.next),Vt(t,u,R),Vt(t,I,w),c=w,u=I,g-=1,p=[],f=[]}else d.delete(_),nr(_,c,i),Vt(t,_.prev,_.next),Vt(t,_,u===null?t.first:u.next),Vt(t,u,_),u=_;continue}for(p=[],f=[];c!==null&&c.k!==h;)c.e.f&ht||(d??(d=new Set)).add(c),f.push(c),c=c.next;if(c===null)continue;_=c}p.push(_),u=_,c=_.next}if(c!==null||d!==void 0){for(var z=d===void 0?[]:Kn(d);c!==null;)c.e.f&ht||z.push(c),c=c.next;var U=z.length;if(U>0){var D=a&wl&&o===0?i:null;if(r){for(g=0;g<U;g+=1)(j=z[g].a)==null||j.measure();for(g=0;g<U;g+=1)(q=z[g].a)==null||q.fix()}Ec(t,z,D)}}r&&li(()=>{var F;if(v!==void 0)for(_ of v)(F=_.a)==null||F.apply()})}function Cc(t,e,i,a,n,r,o,s){var c=Ai,d=(o&_l)!==0,u=(o&ac)===0,v=d?u?sr(i,!1,!1):Ut(i):i,p=o&xl?Ut(n):n,f={i:p,v,k:a,a:null,e:null,o:!1,prev:e,next:null};Ai=f;try{if(t===null){var b=document.createDocumentFragment();b.append(t=zt())}return f.e=vt(()=>r(t,v,p,s)),e!==null&&(e.next=f),f}finally{Ai=c}}function nr(t,e,i){for(var a=t.next?t.next.e.nodes_start:i,n=e?e.e.nodes_start:i,r=t.e.nodes_start;r!==null&&r!==a;){var o=Ca(r);n.before(r),r=o}}function Vt(t,e,i){e===null?(t.first=i,t.effect.first=i&&i.e):(e.e===t.effect.last&&i!==null&&(t.effect.last=i.e),e.e.next&&(e.e.next.prev=null),e.next=i,e.e.next=i&&i.e),i===null?t.effect.last=e&&e.e:(i.e===t.effect.last&&e===null&&(t.effect.last=i.e.prev),i.e.prev&&(i.e.prev.next=null),i.prev=e,i.e.prev=e&&e.e)}function Rl(t,e,i,a){const n=Ii()?Pa:rr;if(i.length===0&&t.length===0){a(e.map(n));return}var r=we,o=Ce,s=Nl();function c(){Promise.all(i.map(d=>Ic(d))).then(d=>{s();try{a([...e.map(n),...d])}catch(u){o.f&ri||ia(u,o)}r==null||r.deactivate(),Ea()}).catch(d=>{ia(d,o)})}t.length>0?Promise.all(t).then(()=>{s();try{return c()}finally{r==null||r.deactivate(),Ea()}}):c()}function Nl(){var t=Ce,e=Te,i=Me,a=we;return function(r=!0){Kt(t),pt(e),ta(i),r&&(a==null||a.activate())}}function Ea(){Kt(null),pt(null),ta(null)}function Pa(t){var e=at|ut,i=Te!==null&&Te.f&at?Te:null;return Ce!==null&&(Ce.f|=Qi),{ctx:Me,deps:null,effects:null,equals:kl,f:e,fn:t,reactions:null,rv:0,v:Xe,wv:0,parent:i??Ce,ac:null}}function Ic(t,e){let i=Ce;i===null&&Gs();var a=i.b,n=void 0,r=Ut(Xe),o=!Te,s=new Map;return Hc(()=>{var p;var c=hl();n=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{d===we&&d.committed&&d.deactivate(),Ea()})}catch(f){c.reject(f),Ea()}var d=we;if(o){var u=!a.is_pending();a.update_pending_count(1),d.increment(u),(p=s.get(d))==null||p.reject($i),s.delete(d),s.set(d,c)}const v=(f,b=void 0)=>{if(d.activate(),b)b!==$i&&(r.f|=gi,oi(r,b));else{r.f&gi&&(r.f^=gi),oi(r,f);for(const[h,_]of s){if(s.delete(h),h===d)break;_.reject($i)}}o&&(a.update_pending_count(-1),d.decrement(u))};c.promise.then(v,f=>v(null,f||"unknown"))}),ja(()=>{for(const c of s.values())c.reject($i)}),new Promise(c=>{function d(u){function v(){u===n?c(r):d(n)}u.then(v,v)}d(n)})}function V(t){const e=Pa(t);return oo(e),e}function rr(t){const e=Pa(t);return e.equals=Tl,e}function Ol(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)nt(e[i])}}function jc(t){for(var e=t.parent;e!==null;){if(!(e.f&at))return e.f&ri?null:e;e=e.parent}return null}function lr(t){var e,i=Ce;Kt(jc(t));try{t.f&=~Sa,Ol(t),e=po(t)}finally{Kt(i)}return e}function Bl(t){var e=lr(t);if(t.equals(e)||(we!=null&&we.is_fork||(t.v=e),t.wv=uo()),!Mi)if(Ge!==null)(Ia()||we!=null&&we.is_fork)&&Ge.set(t,e);else{var i=t.f&It?lt:ni;ot(t,i)}}let or=new Set;const mi=new Map;let Fl=!1;function Ut(t,e){var i={f:0,v:t,reactions:null,equals:kl,rv:0,wv:0};return i}function W(t,e){const i=Ut(t);return oo(i),i}function sr(t,e=!1,i=!0){var n;const a=Ut(t);return e||(a.equals=Tl),ea&&i&&Me!==null&&Me.l!==null&&((n=Me.l).s??(n.s=[])).push(a),a}function A(t,e,i=!1){Te!==null&&(!Gt||Te.f&ml)&&Ii()&&Te.f&(at|Ot|$n|ml)&&!(ct!=null&&ct.includes(t))&&ec();let a=i?Ue(e):e;return oi(t,a)}function oi(t,e){if(!t.equals(e)){var i=t.v;Mi?mi.set(t,e):mi.set(t,i),t.v=e;var a=Ht.ensure();a.capture(t,i),t.f&at&&(t.f&ut&&lr(t),ot(t,t.f&It?lt:ni)),t.wv=uo(),Hl(t,ut),Ii()&&Ce!==null&&Ce.f<&&!(Ce.f&(ai|Ci))&&(xt===null?Uc([t]):xt.push(t)),!a.is_fork&&or.size>0&&!Fl&&zc()}return e}function zc(){Fl=!1;var t=_i;on(!0);const e=Array.from(or);try{for(const i of e)i.f<&&ot(i,ni),Aa(i)&&La(i)}finally{on(t)}or.clear()}function Ac(t,e=1){var i=l(t),a=e===1?i++:i--;return A(t,i),a}function yi(t){A(t,t.v+1)}function Hl(t,e){var i=t.reactions;if(i!==null)for(var a=Ii(),n=i.length,r=0;r<n;r++){var o=i[r],s=o.f;if(!(!a&&o===Ce)){var c=(s&ut)===0;if(c&&ot(o,e),s&at){var d=o;Ge==null||Ge.delete(d),s&Sa||(s&It&&(o.f|=Sa),Hl(d,ni))}else c&&(s&Ot&&jt!==null&&jt.add(o),zi(o))}}}function Ue(t){if(typeof t!="object"||t===null||Ft in t)return t;const e=Yn(t);if(e!==Fs&&e!==Hs)return t;var i=new Map,a=Ve(t),n=W(0),r=ci,o=s=>{if(ci===r)return s();var c=Te,d=ci;pt(null),co(r);var u=s();return pt(c),co(d),u};return a&&i.set("length",W(t.length)),new Proxy(t,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&Qs();var u=i.get(c);return u===void 0?u=o(()=>{var v=W(d.value);return i.set(c,v),v}):A(u,d.value,!0),!0},deleteProperty(s,c){var d=i.get(c);if(d===void 0){if(c in s){const u=o(()=>W(Xe));i.set(c,u),yi(n)}}else A(d,Xe),yi(n);return!0},get(s,c,d){var f;if(c===Ft)return t;var u=i.get(c),v=c in s;if(u===void 0&&(!v||(f=hi(s,c))!=null&&f.writable)&&(u=o(()=>{var b=Ue(v?s[c]:Xe),h=W(b);return h}),i.set(c,u)),u!==void 0){var p=l(u);return p===Xe?void 0:p}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var u=i.get(c);u&&(d.value=l(u))}else if(d===void 0){var v=i.get(c),p=v==null?void 0:v.v;if(v!==void 0&&p!==Xe)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return d},has(s,c){var p;if(c===Ft)return!0;var d=i.get(c),u=d!==void 0&&d.v!==Xe||Reflect.has(s,c);if(d!==void 0||Ce!==null&&(!u||(p=hi(s,c))!=null&&p.writable)){d===void 0&&(d=o(()=>{var f=u?Ue(s[c]):Xe,b=W(f);return b}),i.set(c,d));var v=l(d);if(v===Xe)return!1}return u},set(s,c,d,u){var w;var v=i.get(c),p=c in s;if(a&&c==="length")for(var f=d;f<v.v;f+=1){var b=i.get(f+"");b!==void 0?A(b,Xe):f in s&&(b=o(()=>W(Xe)),i.set(f+"",b))}if(v===void 0)(!p||(w=hi(s,c))!=null&&w.writable)&&(v=o(()=>W(void 0)),A(v,Ue(d)),i.set(c,v));else{p=v.v!==Xe;var h=o(()=>Ue(d));A(v,h)}var _=Reflect.getOwnPropertyDescriptor(s,c);if(_!=null&&_.set&&_.set.call(u,d),!p){if(a&&typeof c=="string"){var g=i.get("length"),k=Number(c);Number.isInteger(k)&&k>=g.v&&A(g,k+1)}yi(n)}return!0},ownKeys(s){l(n);var c=Reflect.ownKeys(s).filter(v=>{var p=i.get(v);return p===void 0||p.v!==Xe});for(var[d,u]of i)u.v!==Xe&&!(d in s)&&c.push(d);return c},setPrototypeOf(){$s()}})}function Vl(t){try{if(t!==null&&typeof t=="object"&&Ft in t)return t[Ft]}catch{}return t}function Lc(t,e){return Object.is(Vl(t),Vl(e))}var Pe,Ul,Wl,Gl;function Mc(){if(Pe===void 0){Pe=window,Ul=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Wl=hi(e,"firstChild").get,Gl=hi(e,"nextSibling").get,fl(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),fl(i)&&(i.__t=void 0)}}function zt(t=""){return document.createTextNode(t)}function Wt(t){return Wl.call(t)}function Ca(t){return Gl.call(t)}function x(t,e){return Wt(t)}function Q(t,e=!1){{var i=Wt(t);return i instanceof Comment&&i.data===""?Ca(i):i}}function S(t,e=1,i=!1){let a=t;for(;e--;)a=Ca(a);return a}function qc(t){t.textContent=""}function Kl(){return!1}function Dc(t,e){if(e){const i=document.body;t.autofocus=!0,li(()=>{document.activeElement===i&&t.focus()})}}let Yl=!1;function Rc(){Yl||(Yl=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const i of t.target.elements)(e=i.__on_r)==null||e.call(i)})},{capture:!0}))}function Nc(t,e,i,a=!0){a&&i();for(var n of e)t.addEventListener(n,i);ja(()=>{for(var r of e)t.removeEventListener(r,i)})}function Li(t){var e=Te,i=Ce;pt(null),Kt(null);try{return t()}finally{pt(e),Kt(i)}}function Zl(t,e,i,a=i){t.addEventListener(e,()=>Li(i));const n=t.__on_r;n?t.__on_r=()=>{n(),a(!0)}:t.__on_r=()=>a(!0),Rc()}function Jl(t){Ce===null&&(Te===null&&Zs(),Ys()),Mi&&Ks()}function Oc(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function At(t,e,i){var a=Ce;a!==null&&a.f&ht&&(t|=ht);var n={ctx:Me,deps:null,nodes_start:null,nodes_end:null,f:t|ut|It,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(i)try{La(n),n.f|=an}catch(s){throw nt(n),s}else e!==null&&zi(n);var r=n;if(i&&r.deps===null&&r.teardown===null&&r.nodes_start===null&&r.first===r.last&&!(r.f&Qi)&&(r=r.first,t&Ot&&t&Bt&&r!==null&&(r.f|=Bt)),r!==null&&(r.parent=a,a!==null&&Oc(r,a),Te!==null&&Te.f&at&&!(t&Ci))){var o=Te;(o.effects??(o.effects=[])).push(r)}return n}function Ia(){return Te!==null&&!Gt}function ja(t){const e=At(en,null,!1);return ot(e,lt),e.teardown=t,e}function Ye(t){Jl();var e=Ce.f,i=!Te&&(e&ai)!==0&&(e&an)===0;if(i){var a=Me;(a.e??(a.e=[])).push(t)}else return Xl(t)}function Xl(t){return At(Jn|yl,t,!1)}function Bc(t){return Jl(),At(en|yl,t,!0)}function Fc(t){Ht.ensure();const e=At(Ci|Qi,t,!0);return(i={})=>new Promise(a=>{i.outro?na(e,()=>{nt(e),a(void 0)}):(nt(e),a(void 0))})}function bi(t){return At(Jn,t,!1)}function Hc(t){return At($n|Qi,t,!0)}function ln(t,e=0){return At(en|e,t,!0)}function H(t,e=[],i=[],a=[]){Rl(a,e,i,n=>{At(en,()=>t(...n.map(l)),!0)})}function si(t,e=0){var i=At(Ot|e,t,!0);return i}function Ql(t,e=0){var i=At(gl|e,t,!0);return i}function vt(t){return At(ai|Qi,t,!0)}function $l(t){var e=t.teardown;if(e!==null){const i=Mi,a=Te;lo(!0),pt(null);try{e.call(null)}finally{lo(i),pt(a)}}}function eo(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){const n=i.ac;n!==null&&Li(()=>{n.abort($i)});var a=i.next;i.f&Ci?i.parent=null:nt(i,e),i=a}}function Vc(t){for(var e=t.first;e!==null;){var i=e.next;e.f&ai||nt(e),e=i}}function nt(t,e=!0){var i=!1;(e||t.f&Xn)&&t.nodes_start!==null&&t.nodes_end!==null&&(to(t.nodes_start,t.nodes_end),i=!0),eo(t,e&&!i),sn(t,0),ot(t,ri);var a=t.transitions;if(a!==null)for(const r of a)r.stop();$l(t);var n=t.parent;n!==null&&n.first!==null&&io(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function to(t,e){for(;t!==null;){var i=t===e?null:Ca(t);t.remove(),t=i}}function io(t){var e=t.parent,i=t.prev,a=t.next;i!==null&&(i.next=a),a!==null&&(a.prev=i),e!==null&&(e.first===t&&(e.first=a),e.last===t&&(e.last=i))}function na(t,e,i=!0){var a=[];cr(t,a,!0),ao(a,()=>{i&&nt(t),e&&e()})}function ao(t,e){var i=t.length;if(i>0){var a=()=>--i||e();for(var n of t)n.out(a)}else e()}function cr(t,e,i){if(!(t.f&ht)){if(t.f^=ht,t.transitions!==null)for(const o of t.transitions)(o.is_global||i)&&e.push(o);for(var a=t.first;a!==null;){var n=a.next,r=(a.f&Bt)!==0||(a.f&ai)!==0&&(t.f&Ot)!==0;cr(a,e,r?i:!1),a=n}}}function dr(t){no(t,!0)}function no(t,e){if(t.f&ht){t.f^=ht,t.f<||(ot(t,ut),zi(t));for(var i=t.first;i!==null;){var a=i.next,n=(i.f&Bt)!==0||(i.f&ai)!==0;no(i,n?e:!1),i=a}if(t.transitions!==null)for(const r of t.transitions)(r.is_global||e)&&r.in()}}function ro(t,e){for(var i=t.nodes_start,a=t.nodes_end;i!==null;){var n=i===a?null:Ca(i);e.append(i),i=n}}let _i=!1;function on(t){_i=t}let Mi=!1;function lo(t){Mi=t}let Te=null,Gt=!1;function pt(t){Te=t}let Ce=null;function Kt(t){Ce=t}let ct=null;function oo(t){Te!==null&&(ct===null?ct=[t]:ct.push(t))}let dt=null,gt=0,xt=null;function Uc(t){xt=t}let so=1,za=0,ci=za;function co(t){ci=t}function uo(){return++so}function Aa(t){var e=t.f;if(e&ut)return!0;if(e&at&&(t.f&=-32769),e&ni){var i=t.deps;if(i!==null)for(var a=i.length,n=0;n<a;n++){var r=i[n];if(Aa(r)&&Bl(r),r.wv>t.wv)return!0}e&It&&Ge===null&&ot(t,lt)}return!1}function vo(t,e,i=!0){var a=t.reactions;if(a!==null&&!(ct!=null&&ct.includes(t)))for(var n=0;n<a.length;n++){var r=a[n];r.f&at?vo(r,e,!1):e===r&&(i?ot(r,ut):r.f<&&ot(r,ni),zi(r))}}function po(t){var b;var e=dt,i=gt,a=xt,n=Te,r=ct,o=Me,s=Gt,c=ci,d=t.f;dt=null,gt=0,xt=null,Te=d&(ai|Ci)?null:t,ct=null,ta(t.ctx),Gt=!1,ci=++za,t.ac!==null&&(Li(()=>{t.ac.abort($i)}),t.ac=null);try{t.f|=Qn;var u=t.fn,v=u(),p=t.deps;if(dt!==null){var f;if(sn(t,gt),p!==null&>>0)for(p.length=gt+dt.length,f=0;f<dt.length;f++)p[gt+f]=dt[f];else t.deps=p=dt;if(_i&&Ia()&&t.f&It)for(f=gt;f<p.length;f++)((b=p[f]).reactions??(b.reactions=[])).push(t)}else p!==null&><p.length&&(sn(t,gt),p.length=gt);if(Ii()&&xt!==null&&!Gt&&p!==null&&!(t.f&(at|ni|ut)))for(f=0;f<xt.length;f++)vo(xt[f],t);return n!==null&&n!==t&&(za++,xt!==null&&(a===null?a=xt:a.push(...xt))),t.f&gi&&(t.f^=gi),v}catch(h){return Cl(h)}finally{t.f^=Qn,dt=e,gt=i,xt=a,Te=n,ct=r,ta(o),Gt=s,ci=c}}function Wc(t,e){let i=e.reactions;if(i!==null){var a=Qa.call(i,t);if(a!==-1){var n=i.length-1;n===0?i=e.reactions=null:(i[a]=i[n],i.pop())}}i===null&&e.f&at&&(dt===null||!dt.includes(e))&&(ot(e,ni),e.f&It&&(e.f^=It,e.f&=-32769),Ol(e),sn(e,0))}function sn(t,e){var i=t.deps;if(i!==null)for(var a=e;a<i.length;a++)Wc(t,i[a])}function La(t){var e=t.f;if(!(e&ri)){ot(t,lt);var i=Ce,a=_i;Ce=t,_i=!0;try{e&(Ot|gl)?Vc(t):eo(t),$l(t);var n=po(t);t.teardown=typeof n=="function"?n:null,t.wv=so;var r;Ne&&bc&&t.f&ut&&t.deps}finally{_i=a,Ce=i}}}async function Ma(){await Promise.resolve(),Il()}function l(t){var e=t.f,i=(e&at)!==0;if(Te!==null&&!Gt){var a=Ce!==null&&(Ce.f&ri)!==0;if(!a&&!(ct!=null&&ct.includes(t))){var n=Te.deps;if(Te.f&Qn)t.rv<za&&(t.rv=za,dt===null&&n!==null&&n[gt]===t?gt++:dt===null?dt=[t]:dt.includes(t)||dt.push(t));else{(Te.deps??(Te.deps=[])).push(t);var r=t.reactions;r===null?t.reactions=[Te]:r.includes(Te)||r.push(Te)}}}if(Mi){if(mi.has(t))return mi.get(t);if(i){var o=t,s=o.v;return(!(o.f<)&&o.reactions!==null||ho(o))&&(s=lr(o)),mi.set(o,s),s}}else i&&(!(Ge!=null&&Ge.has(t))||we!=null&&we.is_fork&&!Ia())&&(o=t,Aa(o)&&Bl(o),_i&&Ia()&&!(o.f&It)&&fo(o));if(Ge!=null&&Ge.has(t))return Ge.get(t);if(t.f&gi)throw t.v;return t.v}function fo(t){if(t.deps!==null){t.f^=It;for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&at&&!(e.f&It)&&fo(e)}}function ho(t){if(t.v===Xe)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(mi.has(e)||e.f&at&&ho(e))return!0;return!1}function wt(t){var e=Gt;try{return Gt=!0,t()}finally{Gt=e}}const Gc=-7169;function ot(t,e){t.f=t.f&Gc|e}function go(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Ft in t)ur(t);else if(!Array.isArray(t))for(let e in t){const i=t[e];typeof i=="object"&&i&&Ft in i&&ur(i)}}}function ur(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let a in t)try{ur(t[a],e)}catch{}const i=Yn(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){const a=pl(i);for(let n in a){const r=a[n].get;if(r)try{r.call(t)}catch{}}}}}function Kc(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Yc=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Zc(t){return Yc.includes(t)}const Jc={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 Xc(t){return t=t.toLowerCase(),Jc[t]??t}const Qc=["touchstart","touchmove"];function $c(t){return Qc.includes(t)}const mo=new Set,vr=new Set;function pr(t,e,i,a={}){function n(r){if(a.capture||qa.call(e,r),!r.cancelBubble)return Li(()=>i==null?void 0:i.call(this,r))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?li(()=>{e.addEventListener(t,n,a)}):e.addEventListener(t,n,a),n}function ed(t,e,i,a={}){var n=pr(e,t,i,a);return()=>{t.removeEventListener(e,n,a)}}function ge(t,e,i,a,n){var r={capture:a,passive:n},o=pr(t,e,i,r);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ja(()=>{e.removeEventListener(t,o,r)})}function xe(t){for(var e=0;e<t.length;e++)mo.add(t[e]);for(var i of vr)i(t)}let yo=null;function qa(t){var _;var e=this,i=e.ownerDocument,a=t.type,n=((_=t.composedPath)==null?void 0:_.call(t))||[],r=n[0]||t.target;yo=t;var o=0,s=yo===t&&t.__root;if(s){var c=n.indexOf(s);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var d=n.indexOf(e);if(d===-1)return;c<=d&&(o=c)}if(r=n[o]||t.target,r!==e){Bs(t,"currentTarget",{configurable:!0,get(){return r||i}});var u=Te,v=Ce;pt(null),Kt(null);try{for(var p,f=[];r!==null;){var b=r.assignedSlot||r.parentNode||r.host||null;try{var h=r["__"+a];h!=null&&(!r.disabled||t.target===r)&&h.call(r,t)}catch(g){p?f.push(g):p=g}if(t.cancelBubble||b===e||b===null)break;r=b}if(p){for(let g of f)queueMicrotask(()=>{throw g});throw p}}finally{t.__root=e,delete t.currentTarget,pt(u),Kt(v)}}}function fr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function qi(t,e){var i=Ce;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function T(t,e){var i=(e&vc)!==0,a=(e&pc)!==0,n,r=!t.startsWith("<!>");return()=>{n===void 0&&(n=fr(r?t:"<!>"+t),i||(n=Wt(n)));var o=a||Ul?document.importNode(n,!0):n.cloneNode(!0);if(i){var s=Wt(o),c=o.lastChild;qi(s,c)}else qi(o,o);return o}}function td(t,e,i="svg"){var a=!t.startsWith("<!>"),n=`<${i}>${a?t:"<!>"+t}</${i}>`,r;return()=>{if(!r){var o=fr(n),s=Wt(o);r=Wt(s)}var c=r.cloneNode(!0);return qi(c,c),c}}function Fe(t,e){return td(t,e,"svg")}function Qe(t=""){{var e=zt(t+"");return qi(e,e),e}}function ye(){var t=document.createDocumentFragment(),e=document.createComment(""),i=zt();return t.append(e,i),qi(e,i),t}function y(t,e){t!==null&&t.before(e)}let cn=!0;function dn(t){cn=t}function X(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=i,t.nodeValue=i+"")}function Lt(t,e){return id(t,e)}const ra=new Map;function id(t,{target:e,anchor:i,props:a={},events:n,context:r,intro:o=!0}){Mc();var s=new Set,c=v=>{for(var p=0;p<v.length;p++){var f=v[p];if(!s.has(f)){s.add(f);var b=$c(f);e.addEventListener(f,qa,{passive:b});var h=ra.get(f);h===void 0?(document.addEventListener(f,qa,{passive:b}),ra.set(f,1)):ra.set(f,h+1)}}};c(Kn(mo)),vr.add(c);var d=void 0,u=Fc(()=>{var v=i??e.appendChild(zt());return ql(v,{pending:()=>{}},p=>{if(r){oe({});var f=Me;f.c=r}n&&(a.$$events=n),cn=o,d=t(p,a)||{},cn=!0,r&&se()}),()=>{var b;for(var p of s){e.removeEventListener(p,qa);var f=ra.get(p);--f===0?(document.removeEventListener(p,qa),ra.delete(p)):ra.set(p,f)}vr.delete(c),v!==i&&((b=v.parentNode)==null||b.removeChild(v))}});return hr.set(d,u),d}let hr=new WeakMap;function Di(t,e){const i=hr.get(t);return i?(hr.delete(t),i(e)):Promise.resolve()}class la{constructor(e,i=!0){Nt(this,"anchor");be(this,Dt,new Map);be(this,$t,new Map);be(this,yt,new Map);be(this,Zi,new Set);be(this,Ga,!0);be(this,Ka,()=>{var e=we;if(O(this,Dt).has(e)){var i=O(this,Dt).get(e),a=O(this,$t).get(i);if(a)dr(a),O(this,Zi).delete(i);else{var n=O(this,yt).get(i);n&&(O(this,$t).set(i,n.effect),O(this,yt).delete(i),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),a=n.effect)}for(const[r,o]of O(this,Dt)){if(O(this,Dt).delete(r),r===e)break;const s=O(this,yt).get(o);s&&(nt(s.effect),O(this,yt).delete(o))}for(const[r,o]of O(this,$t)){if(r===i||O(this,Zi).has(r))continue;const s=()=>{if(Array.from(O(this,Dt).values()).includes(r)){var d=document.createDocumentFragment();ro(o,d),d.append(zt()),O(this,yt).set(r,{effect:o,fragment:d})}else nt(o);O(this,Zi).delete(r),O(this,$t).delete(r)};O(this,Ga)||!a?(O(this,Zi).add(r),na(o,s,!1)):s()}}});be(this,Nn,e=>{O(this,Dt).delete(e);const i=Array.from(O(this,Dt).values());for(const[a,n]of O(this,yt))i.includes(a)||(nt(n.effect),O(this,yt).delete(a))});this.anchor=e,he(this,Ga,i)}ensure(e,i){var a=we,n=Kl();if(i&&!O(this,$t).has(e)&&!O(this,yt).has(e))if(n){var r=document.createDocumentFragment(),o=zt();r.append(o),O(this,yt).set(e,{effect:vt(()=>i(o)),fragment:r})}else O(this,$t).set(e,vt(()=>i(this.anchor)));if(O(this,Dt).set(a,e),n){for(const[s,c]of O(this,$t))s===e?a.skipped_effects.delete(c):a.skipped_effects.add(c);for(const[s,c]of O(this,yt))s===e?a.skipped_effects.delete(c.effect):a.skipped_effects.add(c.effect);a.oncommit(O(this,Ka)),a.ondiscard(O(this,Nn))}else O(this,Ka).call(this)}}Dt=new WeakMap,$t=new WeakMap,yt=new WeakMap,Zi=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,Nn=new WeakMap;const ad=0,gr=1;function un(t,e,i,a,n){var r=Ii(),o=Xe,s=r?Ut(o):sr(o,!1,!1),c=r?Ut(o):sr(o,!1,!1),d=new la(t);si(()=>{var u=e(),v=!1;if(Vs(u)){var p=Nl(),f=!1;const b=h=>{if(!v){f=!0,p(!1),Ht.ensure();try{h()}finally{Ea(),aa||Il()}}};u.then(h=>{b(()=>{oi(s,h),d.ensure(gr,a&&(_=>a(_,s)))})},h=>{b(()=>{if(oi(c,h),d.ensure(gr,n&&(_=>n(_,c))),!n)throw c.v})}),li(()=>{f||b(()=>{d.ensure(ad,i)})})}else oi(s,u),d.ensure(gr,a&&(b=>a(b,s)));return()=>{v=!0}})}function B(t,e,i=!1){var a=new la(t),n=i?Bt:0;function r(o,s){a.ensure(o,s)}si(()=>{var o=!1;e((s,c=!0)=>{o=!0,r(c,s)}),o||r(!1,null)},n)}function Ri(t,e,i){var a=new la(t),n=!Ii();si(()=>{var r=e();n&&r!==null&&typeof r=="object"&&(r={}),a.ensure(r,i)})}function nd(t,e,i=!1,a=!1,n=!1){var r=t,o="";H(()=>{var s=Ce;if(o!==(o=e()??"")&&(s.nodes_start!==null&&(to(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),o!=="")){var c=o+"";i?c=`<svg>${c}</svg>`:a&&(c=`<math>${c}</math>`);var d=fr(c);if((i||a)&&(d=Wt(d)),qi(Wt(d),d.lastChild),i||a)for(;Wt(d);)r.before(Wt(d));else r.before(d)}})}function He(t,e,...i){var a=new la(t);si(()=>{const n=e()??null;a.ensure(n,n&&(r=>n(r,...i)))},Bt)}function mr(t,e,i){var a=new la(t);si(()=>{var n=e()??null;a.ensure(n,n&&(r=>i(r,n)))},Bt)}function bo(t,e,i,a,n,r){var o=null,s=t,c=Ai,d=new la(s,!1);si(()=>{const u=e()||null;var v=u==="svg"?hc:null;if(u===null){d.ensure(null,null),dn(!0);return}return d.ensure(u,p=>{var f=Ai;if(Dl(c),u){if(o=v?document.createElementNS(v,u):document.createElement(u),qi(o,o),a){var b=o.appendChild(zt());a(o,b)}Ce.nodes_end=o,p.before(o)}Dl(f)}),dn(!0),()=>{u&&dn(!1)}},Bt),ja(()=>{dn(!0)})}function rd(t,e){var i;i=document.head.appendChild(zt());try{si(()=>e(i),Xn)}finally{}}function mt(t,e,i){bi(()=>{var a=wt(()=>e(t,i==null?void 0:i())||{});if(i&&(a!=null&&a.update)){var n=!1,r={};ln(()=>{var o=i();go(o),n&&Sl(r,o)&&(r=o,a.update(o))}),n=!0}if(a!=null&&a.destroy)return()=>a.destroy()})}function vn(t,e){var i=void 0,a;Ql(()=>{i!==(i=e())&&(a&&(nt(a),a=null),i&&(a=vt(()=>{bi(()=>i(t))})))})}function _o(t){var e,i,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(i=_o(t[e]))&&(a&&(a+=" "),a+=i)}else for(i in t)t[i]&&(a&&(a+=" "),a+=i);return a}function ld(){for(var t,e,i=0,a="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=_o(t))&&(a&&(a+=" "),a+=e);return a}function od(t){return typeof t=="object"?ld(t):t??""}const xo=[...`
|
|
3
3
|
\r\f \v\uFEFF`];function sd(t,e,i){var a=t==null?"":""+t;if(e&&(a=a?a+" "+e:e),i){for(var n in i)if(i[n])a=a?a+" "+n:n;else if(a.length)for(var r=n.length,o=0;(o=a.indexOf(n,o))>=0;){var s=o+r;(o===0||xo.includes(a[o-1]))&&(s===a.length||xo.includes(a[s]))?a=(o===0?"":a.substring(0,o))+a.substring(s+1):o=s}}return a===""?null:a}function wo(t,e=!1){var i=e?" !important;":";",a="";for(var n in t){var r=t[n];r!=null&&r!==""&&(a+=" "+n+": "+r+i)}return a}function yr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function cd(t,e){if(e){var i="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,o=0,s=!1,c=[];a&&c.push(...Object.keys(a).map(yr)),n&&c.push(...Object.keys(n).map(yr));var d=0,u=-1;const h=t.length;for(var v=0;v<h;v++){var p=t[v];if(s?p==="/"&&t[v-1]==="*"&&(s=!1):r?r===p&&(r=!1):p==="/"&&t[v+1]==="*"?s=!0:p==='"'||p==="'"?r=p:p==="("?o++:p===")"&&o--,!s&&r===!1&&o===0){if(p===":"&&u===-1)u=v;else if(p===";"||v===h-1){if(u!==-1){var f=yr(t.substring(d,u).trim());if(!c.includes(f)){p!==";"&&v++;var b=t.substring(d,v).trim();i+=" "+b+";"}}d=v+1,u=-1}}}}return a&&(i+=wo(a)),n&&(i+=wo(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function _e(t,e,i,a,n,r){var o=t.__className;if(o!==i||o===void 0){var s=sd(i,a,r);s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=i}else if(r&&n!==r)for(var c in r){var d=!!r[c];(n==null||d!==!!n[c])&&t.classList.toggle(c,d)}return r}function br(t,e={},i,a){for(var n in i){var r=i[n];e[n]!==r&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,r,a))}}function We(t,e,i,a){var n=t.__style;if(n!==e){var r=cd(e,a);r==null?t.removeAttribute("style"):t.style.cssText=r,t.__style=e}else a&&(Array.isArray(a)?(br(t,i==null?void 0:i[0],a[0]),br(t,i==null?void 0:i[1],a[1],"important")):br(t,i,a));return a}function pn(t,e,i=!1){if(t.multiple){if(e==null)return;if(!Ve(e))return mc();for(var a of t.options)a.selected=e.includes(Da(a));return}for(a of t.options){var n=Da(a);if(Lc(n,e)){a.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function ko(t){var e=new MutationObserver(()=>{pn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ja(()=>{e.disconnect()})}function dd(t,e,i=e){var a=new WeakSet,n=!0;Zl(t,"change",r=>{var o=r?"[selected]":":checked",s;if(t.multiple)s=[].map.call(t.querySelectorAll(o),Da);else{var c=t.querySelector(o)??t.querySelector("option:not([disabled])");s=c&&Da(c)}i(s),we!==null&&a.add(we)}),bi(()=>{var r=e();if(t===document.activeElement){var o=Ta??we;if(a.has(o))return}if(pn(t,r,n),n&&r===void 0){var s=t.querySelector(":checked");s!==null&&(r=Da(s),i(r))}t.__value=r,n=!1}),ko(t)}function Da(t){return"__value"in t?t.__value:t.value}const oa=Symbol("class"),sa=Symbol("style"),So=Symbol("is custom element"),To=Symbol("is html");function ud(t,e){var i=_r(t);i.value===(i.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function Eo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function re(t,e,i,a){var n=_r(t);n[e]!==(n[e]=i)&&(e==="loading"&&(t[Ws]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Io(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function vd(t,e,i,a,n=!1,r=!1){var o=_r(t),s=o[So],c=!o[To],d=e||{},u=t.tagName==="OPTION";for(var v in e)v in i||(i[v]=null);i.class?i.class=od(i.class):(a||i[oa])&&(i.class=null),i[sa]&&(i.style??(i.style=null));var p=Io(t);for(const w in i){let C=i[w];if(u&&w==="value"&&C==null){t.value=t.__value="",d[w]=C;continue}if(w==="class"){var f=t.namespaceURI==="http://www.w3.org/1999/xhtml";_e(t,f,C,a,e==null?void 0:e[oa],i[oa]),d[w]=C,d[oa]=i[oa];continue}if(w==="style"){We(t,C,e==null?void 0:e[sa],i[sa]),d[w]=C,d[sa]=i[sa];continue}var b=d[w];if(!(C===b&&!(C===void 0&&t.hasAttribute(w)))){d[w]=C;var h=w[0]+w[1];if(h!=="$$")if(h==="on"){const R={},I="$$"+w;let z=w.slice(2);var _=Zc(z);if(Kc(z)&&(z=z.slice(0,-7),R.capture=!0),!_&&b){if(C!=null)continue;t.removeEventListener(z,d[I],R),d[I]=null}if(C!=null)if(_)t[`__${z}`]=C,xe([z]);else{let U=function(D){d[w].call(this,D)};d[I]=pr(z,t,U,R)}else _&&(t[`__${z}`]=void 0)}else if(w==="style")re(t,w,C);else if(w==="autofocus")Dc(t,!!C);else if(!s&&(w==="__value"||w==="value"&&C!=null))t.value=t.__value=C;else if(w==="selected"&&u)Eo(t,C);else{var g=w;c||(g=Xc(g));var k=g==="defaultValue"||g==="defaultChecked";if(C==null&&!s&&!k)if(o[w]=null,g==="value"||g==="checked"){let R=t;const I=e===void 0;if(g==="value"){let z=R.defaultValue;R.removeAttribute(g),R.defaultValue=z,R.value=R.__value=I?z:null}else{let z=R.defaultChecked;R.removeAttribute(g),R.defaultChecked=z,R.checked=I?z:!1}}else t.removeAttribute(w);else k||p.includes(g)&&(s||typeof C!="string")?(t[g]=C,g in o&&(o[g]=Xe)):typeof C!="function"&&re(t,g,C)}}}return d}function Po(t,e,i=[],a=[],n=[],r,o=!1,s=!1){Rl(n,i,a,c=>{var d=void 0,u={},v=t.nodeName==="SELECT",p=!1;if(Ql(()=>{var b=e(...c.map(l)),h=vd(t,d,b,r,o,s);p&&v&&"value"in b&&pn(t,b.value);for(let g of Object.getOwnPropertySymbols(u))b[g]||nt(u[g]);for(let g of Object.getOwnPropertySymbols(b)){var _=b[g];g.description===gc&&(!d||_!==d[g])&&(u[g]&&nt(u[g]),u[g]=vt(()=>vn(t,()=>_))),h[g]=_}d=h}),v){var f=t;bi(()=>{pn(f,d.value,!0),ko(f)})}p=!0})}function _r(t){return t.__attributes??(t.__attributes={[So]:t.nodeName.includes("-"),[To]:t.namespaceURI===fc})}var Co=new Map;function Io(t){var e=t.getAttribute("is")||t.nodeName,i=Co.get(e);if(i)return i;Co.set(e,i=[]);for(var a,n=t,r=Element.prototype;r!==n;){a=pl(n);for(var o in a)a[o].set&&i.push(o);n=Yn(n)}return i}const pd=()=>performance.now(),di={tick:t=>requestAnimationFrame(t),now:()=>pd(),tasks:new Set};function jo(){const t=di.now();di.tasks.forEach(e=>{e.c(t)||(di.tasks.delete(e),e.f())}),di.tasks.size!==0&&di.tick(jo)}function fd(t){let e;return di.tasks.size===0&&di.tick(jo),{promise:new Promise(i=>{di.tasks.add(e={c:t,f:i})}),abort(){di.tasks.delete(e)}}}function fn(t,e){Li(()=>{t.dispatchEvent(new CustomEvent(e))})}function hd(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function zo(t){const e={},i=t.split(";");for(const a of i){const[n,r]=a.split(":");if(!n||r===void 0)break;const o=hd(n.trim());e[o]=r.trim()}return e}const gd=t=>t;function md(t,e,i){var a=Ai,n,r,o,s=null;a.a??(a.a={element:t,measure(){n=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),r=this.element.getBoundingClientRect(),n.left!==r.left||n.right!==r.right||n.top!==r.top||n.bottom!==r.bottom){const c=e()(this.element,{from:n,to:r},i==null?void 0:i());o=hn(this.element,c,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!t.getAnimations().length){var{position:c,width:d,height:u}=getComputedStyle(t);if(c!=="absolute"&&c!=="fixed"){var v=t.style;s={position:v.position,width:v.width,height:v.height,transform:v.transform},v.position="absolute",v.width=d,v.height=u;var p=t.getBoundingClientRect();if(n.left!==p.left||n.top!==p.top){var f=`translate(${n.left-p.left}px, ${n.top-p.top}px)`;v.transform=v.transform?`${v.transform} ${f}`:f}}}},unfix(){if(s){var c=t.style;c.position=s.position,c.width=s.width,c.height=s.height,c.transform=s.transform}}}),a.a.element=t}function Ie(t,e,i,a){var n=(t&cc)!==0,r=(t&dc)!==0,o=n&&r,s=(t&uc)!==0,c=o?"both":n?"in":"out",d,u=e.inert,v=e.style.overflow,p,f;function b(){return Li(()=>d??(d=i()(e,(a==null?void 0:a())??{},{direction:c})))}var h={is_global:s,in(){var w;if(e.inert=u,!n){f==null||f.abort(),(w=f==null?void 0:f.reset)==null||w.call(f);return}r||p==null||p.abort(),fn(e,"introstart"),p=hn(e,b(),f,1,()=>{fn(e,"introend"),p==null||p.abort(),p=d=void 0,e.style.overflow=v})},out(w){if(!r){w==null||w(),d=void 0;return}e.inert=!0,fn(e,"outrostart"),f=hn(e,b(),p,0,()=>{fn(e,"outroend"),w==null||w()})},stop:()=>{p==null||p.abort(),f==null||f.abort()}},_=Ce;if((_.transitions??(_.transitions=[])).push(h),n&&cn){var g=s;if(!g){for(var k=_.parent;k&&k.f&Bt;)for(;(k=k.parent)&&!(k.f&Ot););g=!k||(k.f&an)!==0}g&&bi(()=>{wt(()=>h.in())})}}function hn(t,e,i,a,n){var r=a===1;if(Xi(e)){var o,s=!1;return li(()=>{if(!s){var _=e({direction:r?"in":"out"});o=hn(t,_,i,a,n)}}),{abort:()=>{s=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:bt,deactivate:bt,reset:bt,t:()=>a};const{delay:c=0,css:d,tick:u,easing:v=gd}=e;var p=[];if(r&&i===void 0&&(u&&u(0,1),d)){var f=zo(d(0,1));p.push(f,f)}var b=()=>1-a,h=t.animate(p,{duration:c,fill:"forwards"});return h.onfinish=()=>{h.cancel();var _=(i==null?void 0:i.t())??1-a;i==null||i.abort();var g=a-_,k=e.duration*Math.abs(g),w=[];if(k>0){var C=!1;if(d)for(var R=Math.ceil(k/16.666666666666668),I=0;I<=R;I+=1){var z=_+g*v(I/R),U=zo(d(z,1-z));w.push(U),C||(C=U.overflow==="hidden")}C&&(t.style.overflow="hidden"),b=()=>{var D=h.currentTime;return _+g*v(D/k)},u&&fd(()=>{if(h.playState!=="running")return!1;var D=b();return u(D,1-D),!0})}h=t.animate(w,{duration:k,fill:"forwards"}),h.onfinish=()=>{b=()=>a,u==null||u(a,1-a),n()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=bt)},deactivate:()=>{n=bt},reset:()=>{a===0&&(u==null||u(1,0))},t:()=>b()}}function ca(t,e,i=e){var a=new WeakSet;Zl(t,"input",async n=>{var r=n?t.defaultValue:t.value;if(r=xr(t)?wr(r):r,i(r),we!==null&&a.add(we),await Ma(),r!==(r=e())){var o=t.selectionStart,s=t.selectionEnd,c=t.value.length;if(t.value=r??"",s!==null){var d=t.value.length;o===s&&s===c&&d>c?(t.selectionStart=d,t.selectionEnd=d):(t.selectionStart=o,t.selectionEnd=Math.min(s,d))}}}),wt(e)==null&&t.value&&(i(xr(t)?wr(t.value):t.value),we!==null&&a.add(we)),ln(()=>{var n=e();if(t===document.activeElement){var r=Ta??we;if(a.has(r))return}xr(t)&&n===wr(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}function xr(t){var e=t.type;return e==="number"||e==="range"}function wr(t){return t===""?null:+t}const Bn=class Bn{constructor(e){be(this,On);be(this,Ei,new WeakMap);be(this,_a);be(this,Ya);he(this,Ya,e)}observe(e,i){var a=O(this,Ei).get(e)||new Set;return a.add(i),O(this,Ei).set(e,a),Oe(this,On,Rs).call(this).observe(e,O(this,Ya)),()=>{var n=O(this,Ei).get(e);n.delete(i),n.size===0&&(O(this,Ei).delete(e),O(this,_a).unobserve(e))}}};Ei=new WeakMap,_a=new WeakMap,Ya=new WeakMap,On=new WeakSet,Rs=function(){return O(this,_a)??he(this,_a,new ResizeObserver(e=>{for(var i of e){Bn.entries.set(i.target,i);for(var a of O(this,Ei).get(i.target)||[])a(i)}}))},Nt(Bn,"entries",new WeakMap);let kr=Bn;var yd=new kr({box:"border-box"});function Mt(t,e,i){var a=yd.observe(t,()=>i(t[e]));bi(()=>(wt(()=>i(t[e])),a))}function Ao(t,e){return t===e||(t==null?void 0:t[Ft])===e}function rt(t={},e,i,a){return bi(()=>{var n,r;return ln(()=>{n=r,r=[],wt(()=>{t!==i(...r)&&(e(t,...r),n&&Ao(i(...n),t)&&e(null,...n))})}),()=>{li(()=>{r&&Ao(i(...r),t)&&e(null,...r)})}}),t}function Sr(t,e){Nc(window,["resize"],()=>Li(()=>e(window[t])))}function Tr(t=!1){const e=Me,i=e.l.u;if(!i)return;let a=()=>go(e.s);if(t){let n=0,r={};const o=Pa(()=>{let s=!1;const c=e.s;for(const d in c)c[d]!==r[d]&&(r[d]=c[d],s=!0);return s&&n++,n});a=()=>l(o)}i.b.length&&Bc(()=>{Lo(e,a),Zn(i.b)}),Ye(()=>{const n=wt(()=>i.m.map(Us));return()=>{for(const r of n)typeof r=="function"&&r()}}),i.a.length&&Ye(()=>{Lo(e,a),Zn(i.a)})}function Lo(t,e){if(t.l.s)for(const i of t.l.s)l(i);e()}let gn=!1;function bd(t){var e=gn;try{return gn=!1,[t(),gn]}finally{gn=e}}const _d={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Mo(t,e,i){return new Proxy({props:t,exclude:e},_d)}const xd={get(t,e){let i=t.props.length;for(;i--;){let a=t.props[i];if(Xi(a)&&(a=a()),typeof a=="object"&&a!==null&&e in a)return a[e]}},set(t,e,i){let a=t.props.length;for(;a--;){let n=t.props[a];Xi(n)&&(n=n());const r=hi(n,e);if(r&&r.set)return r.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let a=t.props[i];if(Xi(a)&&(a=a()),typeof a=="object"&&a!==null&&e in a){const n=hi(a,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Ft||e===bl)return!1;for(let i of t.props)if(Xi(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){const e=[];for(let i of t.props)if(Xi(i)&&(i=i()),!!i){for(const a in i)e.includes(a)||e.push(a);for(const a of Object.getOwnPropertySymbols(i))e.includes(a)||e.push(a)}return e}};function mn(...t){return new Proxy({props:t},xd)}function L(t,e,i,a){var w;var n=!ea||(i&rc)!==0,r=(i&oc)!==0,o=(i&sc)!==0,s=a,c=!0,d=()=>(c&&(c=!1,s=o?wt(a):a),s),u;if(r){var v=Ft in t||bl in t;u=((w=hi(t,e))==null?void 0:w.set)??(v&&e in t?C=>t[e]=C:void 0)}var p,f=!1;r?[p,f]=bd(()=>t[e]):p=t[e],p===void 0&&a!==void 0&&(p=d(),u&&(n&&Xs(),u(p)));var b;if(n?b=()=>{var C=t[e];return C===void 0?d():(c=!0,C)}:b=()=>{var C=t[e];return C!==void 0&&(s=void 0),C===void 0?s:C},n&&!(i&lc))return b;if(u){var h=t.$$legacy;return function(C,R){return arguments.length>0?((!n||!R||h||f)&&u(R?b():C),C):b()}}var _=!1,g=(i&nc?Pa:rr)(()=>(_=!1,b()));r&&l(g);var k=Ce;return function(C,R){if(arguments.length>0){const I=R?l(g):n&&r?Ue(C):C;return A(g,I),_=!0,s!==void 0&&(s=I),C}return Mi&&_||k.f&ri?g.v:l(g)}}function $e(t){Me===null&&er(),ea&&Me.l!==null?wd(Me).m.push(t):Ye(()=>{const e=wt(t);if(typeof e=="function")return e})}function Er(t){Me===null&&er(),$e(()=>()=>wt(t))}function wd(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}const kd="5";typeof window<"u"&&((As=window.__svelte??(window.__svelte={})).v??(As.v=new Set)).add(kd);function ui(){var t;return(t=window.PlayPilotLinkInjections)==null?void 0:t.token}const qo="https://www.playpilot.com",Sd="https://partner-api.playpilot.tech/1.0",Td="https://img-external.playpilot.tech",Pr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",Ni=600,Cr={};async function Yt(t,{headers:e={},method:i="GET",body:a=null}={}){const n=!yn()&&i==="GET";if(n&&t in Cr)return Cr[t];const r=i==="GET"?{}:{"Content-Type":"application/json"},o=await fetch(Sd+t,{method:i,headers:new Headers({...r,...e}),body:a?JSON.stringify(a):null});if(!(o!=null&&o.ok))throw o;const s=await o.text();let c=s;try{s&&(c=JSON.parse(s))}catch{}return n&&(Cr[t]=c),c}const Ir="EncryptedToken",Do="articleReplacementEditToken",Ro="playpilot-editorial-mode";async function No({href:t=window.location.href,throwError:e=!1}={}){try{const i=ui();if(!i)throw new Error("No token was provided");const a=jr(t);if(!a)throw new Error("Could not be authenticated");return await Yt(`/external-pages/edit-authorization?api-token=${i}`,{method:"POST",body:{private_token:a}}),Ed(a),!0}catch(i){if(console.error(i),e)throw i}finally{Id()}return!1}function jr(t=""){var a,n;const e=(a=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:a.editorial_token;if(e)return e;if(t){const r=new URL(t).searchParams.get(Do);if(r)return decodeURI(r)}return((n=("; "+document.cookie).split(`; ${Ir}=`).pop())==null?void 0:n.split(";")[0])||""}function Ed(t){const e=new Date;e.setTime(e.getTime()+30*24*60*60*1e3);const a="expires="+e.toUTCString();document.cookie=Ir+"="+t+";"+a+";path=/"}function Pd(){document.cookie=Ir+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function yn(){var e;const t=(e=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:e.editorial_token;return new URLSearchParams(window.location.search).get(Ro)==="true"||!!t}function Cd(){const t=new URL(window.location.href);t.searchParams.set(Ro,"true"),window.history.replaceState({},"",t)}function Id(){const t=new URL(window.location.href);t.searchParams.delete(Do),window.history.replaceState({},"",t)}function jd(t){let e=0;for(let i=0;i<t.length;i++){const a=t.charCodeAt(i);e=e*31+a>>>0}return e.toString(16)}function bn(t=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(;i.length<t;)i+=e[Math.floor(Math.random()*e.length)];return i}const m=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"});function Ra(){var a,n;const t=(a=window.PlayPilotLinkInjections)==null?void 0:a.language,e=Object.values(m);if(t){if(e.includes(t))return t;console.warn(`PlayPilot Link Injections: ${t} is not an accepted language`)}const i=(n=document.querySelector("html"))==null?void 0:n.getAttribute("lang");if(i){if(e.includes(i))return i;const r=e.find(o=>o.toLowerCase().startsWith(i+"-"));if(r)return r}return m.English}function zr(t,e=""){const i=[],a=[t];for(;a.length>0;){const n=a.pop();if(i.includes(n)||e&&n.matches(e)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|LABEL|BLOCKQUOTE|H1)$/.test(n.tagName)||n.offsetWidth<=1)continue;const r=Array.from(n.childNodes).some(c=>{var d;return c.nodeType===Node.TEXT_NODE&&((d=c.nodeValue)==null?void 0:d.trim())!==""});if(r&&n.tagName==="LI"){const c=n.closest("ul, ol");c&&!i.includes(c)&&i.push(c);continue}const o=n.tagName==="P"&&!!n.textContent;if(r||o){i.push(n);continue}const s=Array.from(n.children);for(let c=s.length-1;c>=0;c--)a.push(s[c])}return i}function da(){var e;const t=(e=window.PlayPilotLinkInjections)==null?void 0:e.selector;if(t){const i=t.replace(/(:)/g,"\\$1"),a=document.querySelector(i);if(a)return a}return document.querySelector("article")||document.querySelector("main")||document.body}function Ar(t){return t.map(e=>e.innerText).join(`
|
|
4
4
|
|
|
5
|
-
`)}function Lr(t){const e=da(),i=zr(e,(t==null?void 0:t.exclude_elements_selector)||""),a=Ar(i);return{parentElement:e,elements:i,pageText:a}}function Oo(){const t=da();return{content_heading:zd(t),content_modified_time:Ad(t),content_published_time:Ld(t)}}function zd(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function Ad(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,i=Bo().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Mr(i):null}function Ld(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,i=Bo().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Mr(i):null}function Mr(t){try{return new Date(t).toISOString()}catch{return null}}function Bo(){const t=document.querySelector('[type="application/ld+json"]');if(!t)return{};try{return JSON.parse(t.textContent||"")}catch{return{}}}function Oi(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function qr(t){return Object.entries(t).filter(([i,a])=>a!=null&&a!=="").map(([i,a])=>`${i}=${a}`).join("&")}function Md(t){return!!(t.exclude_urls_pattern&&Oi().match(new RegExp(t.exclude_urls_pattern)))}let Dr=null;async function Bi(t,{url:e=Oi(),hash:i=jd(t||""),params:a={},method:n="GET"}={}){const r=ui(),o=yn()?await No():!1,s=Ra();if(!r)throw new Error("No token was provided");const c=`/external-pages/?api-token=${r}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${s}`;let d;return n==="POST"?(a.run_ai&&(a.hash=i,a.page_text=t),a.url=e,a.metadata=Oo(),d=await Yt(c,{method:"POST",body:a})):d=await Yt(c+`&url=${e}`,{method:"GET"}),window.PlayPilotLinkInjections.last_successful_fetch=d,d}async function Fo(t,{requireCompletedResult:e=!1,runAiWhenRelevant:i=!1,pollInterval:a=3e3,maxTries:n=600,onpoll:r=()=>null}={}){let o=0;Dr&&clearTimeout(Dr);const s=async(c,d)=>{let u;try{try{u=await Bi(t)}catch(v){throw(v==null?void 0:v.status)===404&&(u=await Bi(t,{method:"POST"}),u.ai_enabled&&(u=await Bi(t,{params:{run_ai:!0},method:"POST"}))),new Error}if(u&&i&&(u=await qd(t,u)),e&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=Ho(u.manual_injections||[]),u.ai_injections=Ho(u.ai_injections||[]),c(u);return}catch{if(o++,o>=n){n>1&&console.error("Max poll limit exceeded. Please return later."),c();return}u&&r(u),Dr=setTimeout(()=>s(c),a)}};return new Promise(s)}async function qd(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const i=Oo().content_modified_time,a=e.content_modified_time?Mr(e.content_modified_time):null,n=i&&a===i;return e.ai_last_run&&n||new Date(i||0)<=new Date(a||0)?e:await Bi(t,{params:{run_ai:!0},method:"POST"})}async function Dd(t,e){var o;const i=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,n=t.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,phrase_before:s.phrase_before,phrase_after:s.phrase_after,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Bi(e,{method:"POST",params:{private_token:jr(),manual_injections:n,content_text_selector:i}}))throw new Error("saveLinkInjections response was faulty");return t}function Ho(t){return t.map(e=>({...e,key:Vo(e.sid)}))}function Vo(t){return t+"-"+bn()}function Rd(t,e,i){return t.filter(a=>i.every(n=>a[n]===e[n])).length}function Nd(t,e){return e.some(i=>t>=i.start&&t<i.end)}function Od(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Rr(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function Uo(t,e,i=[]){var r,o;const a=document.createTreeWalker(e);let n;for(;(n=a.nextNode())&&!((r=n.nodeValue)!=null&&r.includes(t)&&!i.includes(((o=n.parentNode)==null?void 0:o.nodeName)||"")););return n}function Wo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Bd(t,e,i,a){const n=Od(e),r=Rr(e),o=t.slice(0,a),s=t.slice(a),c=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${r.replace(c,"\\$&")}|${n.replace(c,"\\$&")}`),u=s.replace(d,i);return o+u}function Fd(t,e,i,a){return t.substring(0,i)+e+t.substring(a)}function kt(t){return Rr(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function Go(t,e,i){const n=t.indexOf(e),r=Math.floor((i-e.length)/2);let o=Math.max(0,n-r),s=o+i;s>t.length&&(s=t.length,o=Math.max(0,s-i));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function Ko(t,e,i){const a=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!a||!t.textContent)return{before:"",after:""};const n=Math.max(a.innerText.indexOf(t.textContent),0),r=Yo(a.innerText.slice(0,e+n)),o=a.innerText.slice(i+n),s=Yo(Zo(r,2)),c=Zo(o,2);return{before:s,after:c}}function Yo(t){return t.split("").reverse().join("")}function Zo(t,e=1){const i=t.match(/[^\s]+/g);return i?i.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function _n(t,e){let i=0,a=0;for(;(a=t.indexOf(e,a))!==-1;)i++,a+=e.length;return i}function Hd(t,e,i){const a=[];let n=0;for(;n<=t.length;){const r=e?t.indexOf(e,n):n;if(r===-1&&e)break;const o=e?r+e.length:r,s=i?t.indexOf(i,o):t.length;if(i&&s===-1)break;const c=t.slice(o,s);a.push({match:c,index:o}),n=i?s+i.length:t.length+1}return a}function Vd(t,e,i,a){const r=Hd(t,i,a).filter(({match:s})=>Rr(s).includes(e));return r.length?r.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function Ud(t){var e,i;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((i=t.match(/\s*$/))==null?void 0:i[0].length)||0}}function Wd(t,e,i=0){const a=e.innerHTML,n=[],r=Gd(e);let o=a.indexOf(t);for(;o!==-1;)Nd(o,r)&&n.push(o),o=a.indexOf(t,o+t.length);return n[i]??-1}function Gd(t){const e=[],i=t.innerHTML;let a=!1,n=!1,r=!1,o=0;for(let s=0;s<i.length;s++){const c=i[s];if(!n&&!a&&c==="<"){a=!0,r&&(e.push({start:o,end:s}),r=!1);continue}if(a&&c==='"'&&(n=!n),a&&!n&&c===">"){a=!1;continue}!a&&!n&&!r&&(o=s,r=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function Kd(t,e){const i=[" ",".",",","<",">"];try{const a=i.map(s=>"\\"+s).join(""),n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`([${a}])${n}([${a}])`),o=e.match(r);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function Jo(t){return t.ctrlKey||t.metaKey||t.button!==0}const ve={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",InjectionVisible:"ali_injection_visible",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action",ShareTitle:"ali_share_title",SaveTitle:"ali_save_title",NotifyTitle:"ali_notify_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",YouTubeAvailabilityRequestFailed:"ali_youtube_availability_request_failed",CardToExploreCta:"ali_card_to_explore_cta",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreNavigate:"venus_navigate"},Na={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest"};function Yd(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function qt(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function xn(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Nr=[{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];function Zd(t=[]){return t.map(e=>{var i;return((i=Nr.find(a=>a.slug===e))==null?void 0:i.name)||""}).filter(Boolean)}const Or="playpilot_user_id";function Jd(){if(!Xo())return null;try{const t=localStorage.getItem(Or);return t||(localStorage.setItem(Or,bn(16)),localStorage.getItem(Or))}catch{return null}}function Xo(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.allow_user_id_tracking)}const Xd="https://insights.playpilot.net";async function pe(t,e=null,i={}){var n,r,o,s,c;if(xn())return;if(!qt("tracking")){$d(t,e,i);return}const a=new Headers({"Content-Type":"application/json"});e&&(i={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:Zd(e.genres),providers:[...new Set(((n=e.providers)==null?void 0:n.map(d=>d.name))||[])],...i}),Xo()&&(i.user_id=Jd()),i.version="8.5.9",i.time_since_initialize=(r=window.PlayPilotLinkInjections)!=null&&r.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,i.url=Oi(),i.organization_sid=((o=window.PlayPilotLinkInjections)==null?void 0:o.organization_sid)||"undefined",i.domain_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.domain_sid)||"undefined",i.device={type:window.innerWidth>Ni?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((c=screen.orientation)==null?void 0:c.type)||"undefined"},fetch(Xd,{headers:a,method:"POST",body:JSON.stringify({event:t,payload:i,source:"ali",keepalive:!0})}),Qd({event:t,payload:i})}function Qd(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function Qo({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function $d(t,e=null,i={}){var a;(a=window.PlayPilotLinkInjections).queued_tracking_events||(a.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:i})}function eu(){if(qt("tracking")){for(const{event:t,title:e,payload:i}of window.PlayPilotLinkInjections.queued_tracking_events||[])pe(t,e,i);window.PlayPilotLinkInjections.queued_tracking_events=[]}}function $o(){var t;return(t=window.PlayPilotLinkInjections.config)!=null&&t.allow_retargeting_pixels?qt("pixels"):!1}async function es(){if(!qt("ads"))return[];const t=ui();if(!t)throw new Error("No token was provided");try{return await Yt(`/ads/browse/?api-token=${t}`)}catch(e){throw pe(ve.AdsFetchFailed,null,{status:e.status}),e}}function Oa(t){var e;return!qt("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(i=>i.campaign_format===t)||null}function tu(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}const iu={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online",[m.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"In-Text Disclaimer":{[m.English]:"We may earn a commission from purchases made through some of the links below.",[m.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[m.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade",[m.Danish]:"Der opstod en fejl"},Loading:{[m.English]:"Loading",[m.Swedish]:"Laddar",[m.Danish]:"Indlæser"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu.",[m.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu.",[m.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på",[m.Danish]:"kan streames på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama.",[m.Danish]:"kan streames."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ",[m.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[m.English]:"and",[m.Swedish]:"och",[m.Danish]:"og"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter",[m.Danish]:"minutter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film",[m.Danish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie",[m.Danish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Streama",[m.Danish]:"Stream"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp",[m.Danish]:"Køb"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyr",[m.Danish]:"Lej"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyr/köp",[m.Danish]:"Lej eller køb"},Watch:{[m.English]:"Watch",[m.Swedish]:"Titta nu",[m.Danish]:"Se nu"},"Category: AVOD":{[m.English]:"Stream for free",[m.Swedish]:"Streama gratis",[m.Danish]:"Stream gratis"},"Category: SVOD":{[m.English]:"Streaming services",[m.Swedish]:"Streamingtjänster",[m.Danish]:"Streamingtjenester"},"Category: RENT":{[m.English]:"Rent it",[m.Swedish]:"Hyr den",[m.Danish]:"Lej den"},"Category: BUY":{[m.English]:"Buy it",[m.Swedish]:"Köp den",[m.Danish]:"Køb den"},"Category: Other":{[m.English]:"Other",[m.Swedish]:"Annat",[m.Danish]:"Andet"},Share:{[m.English]:"Share",[m.Swedish]:"Dela",[m.Danish]:"Del"},"Copy URL":{[m.English]:"Copy URL",[m.Swedish]:"Kopiera URL",[m.Danish]:"Kopiér URL"},Email:{[m.English]:"Email",[m.Swedish]:"E-post",[m.Danish]:"E-mail"},"Show More":{[m.English]:"Show more",[m.Swedish]:"Visa mer",[m.Danish]:"Vis mere"},Cast:{[m.English]:"Cast",[m.Swedish]:"Rollista",[m.Danish]:"Skuespillere"},"Similar Titles":{[m.English]:"Similar movies & shows",[m.Swedish]:"Liknande filmer och serier",[m.Danish]:"Lignende film og serier"},"Watch Trailer":{[m.English]:"Watch trailer",[m.Swedish]:"Se trailer",[m.Danish]:"Se trailer"},"Streaming Guide":{[m.English]:"Streaming Guide",[m.Swedish]:"Streaming Guide",[m.Danish]:"Streaming Guide"},"Streaming Guide Description":{[m.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[m.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[m.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[m.English]:"Search movies and shows",[m.Swedish]:"Sök filmer och serier",[m.Danish]:"Søg film og serier"},Services:{[m.English]:"Services",[m.Swedish]:"Tjänster",[m.Danish]:"Tjenester"},Genres:{[m.English]:"Genres",[m.Swedish]:"Genrer",[m.Danish]:"Genrer"},IMDb:{[m.English]:"IMDb",[m.Swedish]:"IMDb",[m.Danish]:"IMDb"},Year:{[m.English]:"Year",[m.Swedish]:"År",[m.Danish]:"År"},Runtime:{[m.English]:"Runtime",[m.Swedish]:"Speltid",[m.Danish]:"Spilletid"},Countries:{[m.English]:"Countries",[m.Swedish]:"Länder",[m.Danish]:"Lande"},"All Filters":{[m.English]:"All filters",[m.Swedish]:"Alla filter",[m.Danish]:"Alle filtre"},"Sort By":{[m.English]:"Sort by",[m.Swedish]:"Sortera efter",[m.Danish]:"Sortér efter"},Popularity:{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},New:{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"Top Rated":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},Search:{[m.English]:"Search",[m.Swedish]:"Sök",[m.Danish]:"Søg"},"Born On":{[m.English]:"Born on",[m.Swedish]:"Född den",[m.Danish]:"Født den"},"Died On":{[m.English]:"Died on",[m.Swedish]:"Död den",[m.Danish]:"Død den"},Credits:{[m.English]:"Credits",[m.Swedish]:"Medverkande",[m.Danish]:"Medvirkende"},Home:{[m.English]:"Home",[m.Swedish]:"Hem",[m.Danish]:"Hjem"},Explore:{[m.English]:"Explore",[m.Swedish]:"Utforska",[m.Danish]:"Udforsk"},"List: Trending":{[m.English]:"Trending Movies & Shows",[m.Swedish]:"Trendande Titlar",[m.Danish]:"Populære film og serier"},"List: Upcoming":{[m.English]:"Upcoming Releases",[m.Swedish]:"Kommande Premiärer",[m.Danish]:"Mest ventede film"},"List: New":{[m.English]:"New Releases",[m.Swedish]:"Nya Filmer & Serier",[m.Danish]:"Nye film og serier"},"List: Demand":{[m.English]:"Always in Demand",[m.Swedish]:"Tidlösa Favoriter",[m.Danish]:"Tidløse favoritter"},"List: Cinema":{[m.English]:"Coming to Cinemas",[m.Swedish]:"Snart på Bio",[m.Danish]:"Kommende film"},All:{[m.English]:"All",[m.Swedish]:"Alla",[m.Danish]:"Alle"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat",[m.Danish]:"Umanuskriptet"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie",[m.Danish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow",[m.Danish]:"Quizshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir",[m.Danish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning",[m.Danish]:"Underholdning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter",[m.Danish]:"Nyheder"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm",[m.Danish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood",[m.Danish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert",[m.Danish]:"Koncert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse",[m.Danish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version",[m.Danish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV",[m.Danish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur",[m.Danish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama",[m.Danish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal",[m.Danish]:"Krimi"},Western:{[m.English]:"Western",[m.Swedish]:"Western",[m.Danish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller",[m.Danish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat",[m.Danish]:"Animation"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium",[m.Danish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap",[m.Danish]:"Videnskab"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur",[m.Danish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig",[m.Danish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi",[m.Danish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär",[m.Danish]:"Dokumentar"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup",[m.Danish]:"Stand-up"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow",[m.Danish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy",[m.Danish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia",[m.Danish]:"Historie"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr",[m.Danish]:"Eventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action",[m.Danish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck",[m.Danish]:"Gyser"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi",[m.Danish]:"Komedie"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi",[m.Danish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik",[m.Danish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport",[m.Danish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik",[m.Danish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn",[m.Danish]:"Børn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil",[m.Danish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal",[m.Danish]:"Musical"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime",[m.Danish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj",[m.Danish]:"Familie"}};function ue(t,e=Ra()){var i;return((i=iu[t])==null?void 0:i[e])||t}async function Br(t=5e3){var i,a,n,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.region;if(e)return e;try{const s=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let c=(a=s==null?void 0:s.country)==null?void 0:a.toLowerCase();if(!c)throw new Error("No country was returned by api.country.is");return c==="gb"&&(c="uk"),au(c),c}catch(o){return pe(ve.RegionRequestFailed,null,{message:o.message}),((r=(n=window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.fallback_region)||""}}function au(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t)}async function Fr(t={}){const e=ui();if(!e)throw new Error("No token was provided");return t={...t,language:Ra(),include_count:"false"},t.region!==null&&(t.region=t.region||await Br()),await Yt(`/titles/browse?api-token=${e}&`+qr(t))}async function nu(t){return(await Fr({related_to_sid:t.sid})).results}const wn=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best"}),ru=t=>t;function Hr(t){const e=t-1;return e*e*e+1}function ts(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function St(t,{delay:e=0,duration:i=400,easing:a=ru}={}){const n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:a,css:r=>`opacity: ${r*n}`}}function ua(t,{delay:e=0,duration:i=400,easing:a=Hr,x:n=0,y:r=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,d=s.transform==="none"?"":s.transform,u=c*(1-o),[v,p]=ts(n),[f,b]=ts(r);return{delay:e,duration:i,easing:a,css:(h,_)=>`
|
|
5
|
+
`)}function Lr(t){const e=da(),i=zr(e,(t==null?void 0:t.exclude_elements_selector)||""),a=Ar(i);return{parentElement:e,elements:i,pageText:a}}function Oo(){const t=da();return{content_heading:zd(t),content_modified_time:Ad(t),content_published_time:Ld(t)}}function zd(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function Ad(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,i=Bo().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Mr(i):null}function Ld(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,i=Bo().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Mr(i):null}function Mr(t){try{return new Date(t).toISOString()}catch{return null}}function Bo(){const t=document.querySelector('[type="application/ld+json"]');if(!t)return{};try{return JSON.parse(t.textContent||"")}catch{return{}}}function Oi(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function qr(t){return Object.entries(t).filter(([i,a])=>a!=null&&a!=="").map(([i,a])=>`${i}=${a}`).join("&")}function Md(t){return!!(t.exclude_urls_pattern&&Oi().match(new RegExp(t.exclude_urls_pattern)))}let Dr=null;async function Bi(t,{url:e=Oi(),hash:i=jd(t||""),params:a={},method:n="GET"}={}){const r=ui(),o=yn()?await No():!1,s=Ra();if(!r)throw new Error("No token was provided");const c=`/external-pages/?api-token=${r}&include_title_details=true${o?"&editorial_mode_enabled=true":""}&language=${s}`;let d;return n==="POST"?(a.run_ai&&(a.hash=i,a.page_text=t),a.url=e,a.metadata=Oo(),d=await Yt(c,{method:"POST",body:a})):d=await Yt(c+`&url=${e}`,{method:"GET"}),window.PlayPilotLinkInjections.last_successful_fetch=d,d}async function Fo(t,{requireCompletedResult:e=!1,runAiWhenRelevant:i=!1,pollInterval:a=3e3,maxTries:n=600,onpoll:r=()=>null}={}){let o=0;Dr&&clearTimeout(Dr);const s=async(c,d)=>{let u;try{try{u=await Bi(t)}catch(v){throw(v==null?void 0:v.status)===404&&(u=await Bi(t,{method:"POST"}),u.ai_enabled&&(u=await Bi(t,{params:{run_ai:!0},method:"POST"}))),new Error}if(u&&i&&(u=await qd(t,u)),e&&u.ai_enabled&&u.ai_running)throw new Error;u.manual_injections=Ho(u.manual_injections||[]),u.ai_injections=Ho(u.ai_injections||[]),c(u);return}catch{if(o++,o>=n){n>1&&console.error("Max poll limit exceeded. Please return later."),c();return}u&&r(u),Dr=setTimeout(()=>s(c),a)}};return new Promise(s)}async function qd(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const i=Oo().content_modified_time,a=e.content_modified_time?Mr(e.content_modified_time):null,n=i&&a===i;return e.ai_last_run&&n||new Date(i||0)<=new Date(a||0)?e:await Bi(t,{params:{run_ai:!0},method:"POST"})}async function Dd(t,e){var o;const i=(o=window.PlayPilotLinkInjections)==null?void 0:o.selector,n=t.filter(s=>s.manual).map(s=>({sid:s.sid,title:s.title,sentence:s.sentence,phrase_before:s.phrase_before,phrase_after:s.phrase_after,playpilot_url:s.playpilot_url,after_article:!!s.after_article,after_article_style:s.after_article_style||null,in_text:s.in_text??!0,inactive:!!s.inactive,removed:!!s.removed}));if(!await Bi(e,{method:"POST",params:{private_token:jr(),manual_injections:n,content_text_selector:i}}))throw new Error("saveLinkInjections response was faulty");return t}function Ho(t){return t.map(e=>({...e,key:Vo(e.sid)}))}function Vo(t){return t+"-"+bn()}function Rd(t,e,i){return t.filter(a=>i.every(n=>a[n]===e[n])).length}function Nd(t,e){return e.some(i=>t>=i.start&&t<i.end)}function Od(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Rr(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function Uo(t,e,i=[]){var r,o;const a=document.createTreeWalker(e);let n;for(;(n=a.nextNode())&&!((r=n.nodeValue)!=null&&r.includes(t)&&!i.includes(((o=n.parentNode)==null?void 0:o.nodeName)||"")););return n}function Wo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Bd(t,e,i,a){const n=Od(e),r=Rr(e),o=t.slice(0,a),s=t.slice(a),c=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${r.replace(c,"\\$&")}|${n.replace(c,"\\$&")}`),u=s.replace(d,i);return o+u}function Fd(t,e,i,a){return t.substring(0,i)+e+t.substring(a)}function kt(t){return Rr(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function Go(t,e,i){const n=t.indexOf(e),r=Math.floor((i-e.length)/2);let o=Math.max(0,n-r),s=o+i;s>t.length&&(s=t.length,o=Math.max(0,s-i));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function Ko(t,e,i){const a=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!a||!t.textContent)return{before:"",after:""};const n=Math.max(a.innerText.indexOf(t.textContent),0),r=Yo(a.innerText.slice(0,e+n)),o=a.innerText.slice(i+n),s=Yo(Zo(r,2)),c=Zo(o,2);return{before:s,after:c}}function Yo(t){return t.split("").reverse().join("")}function Zo(t,e=1){const i=t.match(/[^\s]+/g);return i?i.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function _n(t,e){let i=0,a=0;for(;(a=t.indexOf(e,a))!==-1;)i++,a+=e.length;return i}function Hd(t,e,i){const a=[];let n=0;for(;n<=t.length;){const r=e?t.indexOf(e,n):n;if(r===-1&&e)break;const o=e?r+e.length:r,s=i?t.indexOf(i,o):t.length;if(i&&s===-1)break;const c=t.slice(o,s);a.push({match:c,index:o}),n=i?s+i.length:t.length+1}return a}function Vd(t,e,i,a){const r=Hd(t,i,a).filter(({match:s})=>Rr(s).includes(e));return r.length?r.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function Ud(t){var e,i;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((i=t.match(/\s*$/))==null?void 0:i[0].length)||0}}function Wd(t,e,i=0){const a=e.innerHTML,n=[],r=Gd(e);let o=a.indexOf(t);for(;o!==-1;)Nd(o,r)&&n.push(o),o=a.indexOf(t,o+t.length);return n[i]??-1}function Gd(t){const e=[],i=t.innerHTML;let a=!1,n=!1,r=!1,o=0;for(let s=0;s<i.length;s++){const c=i[s];if(!n&&!a&&c==="<"){a=!0,r&&(e.push({start:o,end:s}),r=!1);continue}if(a&&c==='"'&&(n=!n),a&&!n&&c===">"){a=!1;continue}!a&&!n&&!r&&(o=s,r=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function Kd(t,e){const i=[" ",".",",","<",">"];try{const a=i.map(s=>"\\"+s).join(""),n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`([${a}])${n}([${a}])`),o=e.match(r);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function Jo(t){return t.ctrlKey||t.metaKey||t.button!==0}const ve={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",InjectionVisible:"ali_injection_visible",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action",ShareTitle:"ali_share_title",SaveTitle:"ali_save_title",NotifyTitle:"ali_notify_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",YouTubeAvailabilityRequestFailed:"ali_youtube_availability_request_failed",CardToExploreCta:"ali_card_to_explore_cta",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreNavigate:"venus_navigate"},Na={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest"};function Yd(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function qt(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function xn(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Nr=[{slug:"999",name:"Unscripted",categories:{},media_format:"video"},{slug:"900",name:"Independent",categories:{},media_format:"video"},{slug:"113",name:"Game Show",categories:{series:36,kids:28},media_format:"video"},{slug:"112",name:"Film Noir",categories:{movie:37},media_format:"video"},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42},media_format:"video"},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38},media_format:"video"},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36},media_format:"video"},{slug:"902",name:"Bollywood",categories:{},media_format:"video"},{slug:"240",name:"Concert",categories:{movie:45},media_format:"video"},{slug:"901",name:"Arthouse",categories:{},media_format:"video"},{slug:"903",name:"Alternate Version",categories:{},media_format:"video"},{slug:"121",name:"Reality TV",categories:{series:24},media_format:"video"},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44},media_format:"video"},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44},media_format:"video"},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84},media_format:"video"},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24},media_format:"video"},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70},media_format:"video"},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50},media_format:"video"},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76},media_format:"video"},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74},media_format:"video"},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28},media_format:"video"},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66},media_format:"video"},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32},media_format:"video"},{slug:"106",name:"Documentary",categories:{kids:50},media_format:"video"},{slug:"232",name:"Stand-up",categories:{movie:18,series:18},media_format:"video"},{slug:"126",name:"Talk Show",categories:{kids:34,series:16},media_format:"video"},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38},media_format:"video"},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90},media_format:"video"},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88},media_format:"video"},{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90},media_format:"video"},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80},media_format:"video"},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86},media_format:"video"},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46},media_format:"video"},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32},media_format:"video"},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20},media_format:"video"},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74},media_format:"video"},{slug:"103",name:"Kids",categories:{kids:76},media_format:"video"},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34},media_format:"video"},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30},media_format:"video"},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48},media_format:"video"},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40},media_format:"video"}];function Zd(t=[]){return t.map(e=>{var i;return((i=Nr.find(a=>a.slug===e))==null?void 0:i.name)||""}).filter(Boolean)}const Or="playpilot_user_id";function Jd(){if(!Xo())return null;try{const t=localStorage.getItem(Or);return t||(localStorage.setItem(Or,bn(16)),localStorage.getItem(Or))}catch{return null}}function Xo(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.allow_user_id_tracking)}const Xd="https://insights.playpilot.net";async function pe(t,e=null,i={}){var n,r,o,s,c;if(xn())return;if(!qt("tracking")){$d(t,e,i);return}const a=new Headers({"Content-Type":"application/json"});e&&(i={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:Zd(e.genres),providers:[...new Set(((n=e.providers)==null?void 0:n.map(d=>d.name))||[])],...i}),Xo()&&(i.user_id=Jd()),i.version="8.5.10-beta.1",i.time_since_initialize=(r=window.PlayPilotLinkInjections)!=null&&r.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,i.url=Oi(),i.organization_sid=((o=window.PlayPilotLinkInjections)==null?void 0:o.organization_sid)||"undefined",i.domain_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.domain_sid)||"undefined",i.device={type:window.innerWidth>Ni?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((c=screen.orientation)==null?void 0:c.type)||"undefined"},fetch(Xd,{headers:a,method:"POST",body:JSON.stringify({event:t,payload:i,source:"ali",keepalive:!0})}),Qd({event:t,payload:i})}function Qd(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function Qo({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function $d(t,e=null,i={}){var a;(a=window.PlayPilotLinkInjections).queued_tracking_events||(a.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:i})}function eu(){if(qt("tracking")){for(const{event:t,title:e,payload:i}of window.PlayPilotLinkInjections.queued_tracking_events||[])pe(t,e,i);window.PlayPilotLinkInjections.queued_tracking_events=[]}}function $o(){var t;return(t=window.PlayPilotLinkInjections.config)!=null&&t.allow_retargeting_pixels?qt("pixels"):!1}async function es(){if(!qt("ads"))return[];const t=ui();if(!t)throw new Error("No token was provided");try{return await Yt(`/ads/browse/?api-token=${t}`)}catch(e){throw pe(ve.AdsFetchFailed,null,{status:e.status}),e}}function Oa(t){var e;return!qt("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(i=>i.campaign_format===t)||null}function tu(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}const iu={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online",[m.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"In-Text Disclaimer":{[m.English]:"We may earn a commission from purchases made through some of the links below.",[m.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[m.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade",[m.Danish]:"Der opstod en fejl"},Loading:{[m.English]:"Loading",[m.Swedish]:"Laddar",[m.Danish]:"Indlæser"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu.",[m.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu.",[m.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på",[m.Danish]:"kan streames på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama.",[m.Danish]:"kan streames."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ",[m.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[m.English]:"and",[m.Swedish]:"och",[m.Danish]:"og"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter",[m.Danish]:"minutter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film",[m.Danish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie",[m.Danish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Streama",[m.Danish]:"Stream"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp",[m.Danish]:"Køb"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyr",[m.Danish]:"Lej"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyr/köp",[m.Danish]:"Lej eller køb"},Watch:{[m.English]:"Watch",[m.Swedish]:"Titta nu",[m.Danish]:"Se nu"},"Category: AVOD":{[m.English]:"Stream for free",[m.Swedish]:"Streama gratis",[m.Danish]:"Stream gratis"},"Category: SVOD":{[m.English]:"Streaming services",[m.Swedish]:"Streamingtjänster",[m.Danish]:"Streamingtjenester"},"Category: RENT":{[m.English]:"Rent it",[m.Swedish]:"Hyr den",[m.Danish]:"Lej den"},"Category: BUY":{[m.English]:"Buy it",[m.Swedish]:"Köp den",[m.Danish]:"Køb den"},"Category: Other":{[m.English]:"Other",[m.Swedish]:"Annat",[m.Danish]:"Andet"},Share:{[m.English]:"Share",[m.Swedish]:"Dela",[m.Danish]:"Del"},"Copy URL":{[m.English]:"Copy URL",[m.Swedish]:"Kopiera URL",[m.Danish]:"Kopiér URL"},Email:{[m.English]:"Email",[m.Swedish]:"E-post",[m.Danish]:"E-mail"},"Show More":{[m.English]:"Show more",[m.Swedish]:"Visa mer",[m.Danish]:"Vis mere"},Cast:{[m.English]:"Cast",[m.Swedish]:"Rollista",[m.Danish]:"Skuespillere"},"Similar Titles":{[m.English]:"Similar movies & shows",[m.Swedish]:"Liknande filmer och serier",[m.Danish]:"Lignende film og serier"},"Watch Trailer":{[m.English]:"Watch trailer",[m.Swedish]:"Se trailer",[m.Danish]:"Se trailer"},"Streaming Guide":{[m.English]:"Streaming Guide",[m.Swedish]:"Streaming Guide",[m.Danish]:"Streaming Guide"},"Streaming Guide Description":{[m.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[m.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[m.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[m.English]:"Search movies and shows",[m.Swedish]:"Sök filmer och serier",[m.Danish]:"Søg film og serier"},Services:{[m.English]:"Services",[m.Swedish]:"Tjänster",[m.Danish]:"Tjenester"},Genres:{[m.English]:"Genres",[m.Swedish]:"Genrer",[m.Danish]:"Genrer"},IMDb:{[m.English]:"IMDb",[m.Swedish]:"IMDb",[m.Danish]:"IMDb"},Year:{[m.English]:"Year",[m.Swedish]:"År",[m.Danish]:"År"},Runtime:{[m.English]:"Runtime",[m.Swedish]:"Speltid",[m.Danish]:"Spilletid"},Countries:{[m.English]:"Countries",[m.Swedish]:"Länder",[m.Danish]:"Lande"},"All Filters":{[m.English]:"All filters",[m.Swedish]:"Alla filter",[m.Danish]:"Alle filtre"},"Sort By":{[m.English]:"Sort by",[m.Swedish]:"Sortera efter",[m.Danish]:"Sortér efter"},Popularity:{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},New:{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"Top Rated":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},Search:{[m.English]:"Search",[m.Swedish]:"Sök",[m.Danish]:"Søg"},"Born On":{[m.English]:"Born on",[m.Swedish]:"Född den",[m.Danish]:"Født den"},"Died On":{[m.English]:"Died on",[m.Swedish]:"Död den",[m.Danish]:"Død den"},Credits:{[m.English]:"Credits",[m.Swedish]:"Medverkande",[m.Danish]:"Medvirkende"},Home:{[m.English]:"Home",[m.Swedish]:"Hem",[m.Danish]:"Hjem"},Explore:{[m.English]:"Explore",[m.Swedish]:"Utforska",[m.Danish]:"Udforsk"},"List: Trending":{[m.English]:"Trending Movies & Shows",[m.Swedish]:"Trendande Titlar",[m.Danish]:"Populære film og serier"},"List: Upcoming":{[m.English]:"Upcoming Releases",[m.Swedish]:"Kommande Premiärer",[m.Danish]:"Mest ventede film"},"List: New":{[m.English]:"New Releases",[m.Swedish]:"Nya Filmer & Serier",[m.Danish]:"Nye film og serier"},"List: Demand":{[m.English]:"Always in Demand",[m.Swedish]:"Tidlösa Favoriter",[m.Danish]:"Tidløse favoritter"},"List: Cinema":{[m.English]:"Coming to Cinemas",[m.Swedish]:"Snart på Bio",[m.Danish]:"Kommende film"},All:{[m.English]:"All",[m.Swedish]:"Alla",[m.Danish]:"Alle"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat",[m.Danish]:"Umanuskriptet"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie",[m.Danish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow",[m.Danish]:"Quizshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir",[m.Danish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning",[m.Danish]:"Underholdning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter",[m.Danish]:"Nyheder"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm",[m.Danish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood",[m.Danish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert",[m.Danish]:"Koncert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse",[m.Danish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version",[m.Danish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV",[m.Danish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur",[m.Danish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama",[m.Danish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal",[m.Danish]:"Krimi"},Western:{[m.English]:"Western",[m.Swedish]:"Western",[m.Danish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller",[m.Danish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat",[m.Danish]:"Animation"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium",[m.Danish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap",[m.Danish]:"Videnskab"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur",[m.Danish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig",[m.Danish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi",[m.Danish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär",[m.Danish]:"Dokumentar"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup",[m.Danish]:"Stand-up"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow",[m.Danish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy",[m.Danish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia",[m.Danish]:"Historie"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr",[m.Danish]:"Eventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action",[m.Danish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck",[m.Danish]:"Gyser"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi",[m.Danish]:"Komedie"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi",[m.Danish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik",[m.Danish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport",[m.Danish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik",[m.Danish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn",[m.Danish]:"Børn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil",[m.Danish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal",[m.Danish]:"Musical"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime",[m.Danish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj",[m.Danish]:"Familie"}};function ue(t,e=Ra()){var i;return((i=iu[t])==null?void 0:i[e])||t}async function Br(t=5e3){var i,a,n,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.region;if(e)return e;try{const s=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let c=(a=s==null?void 0:s.country)==null?void 0:a.toLowerCase();if(!c)throw new Error("No country was returned by api.country.is");return c==="gb"&&(c="uk"),au(c),c}catch(o){return pe(ve.RegionRequestFailed,null,{message:o.message}),((r=(n=window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.fallback_region)||""}}function au(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t)}async function Fr(t={}){const e=ui();if(!e)throw new Error("No token was provided");return t={...t,language:Ra(),include_count:"false"},t.region!==null&&(t.region=t.region||await Br()),await Yt(`/titles/browse?api-token=${e}&`+qr(t))}async function nu(t){return(await Fr({related_to_sid:t.sid})).results}const wn=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best"}),ru=t=>t;function Hr(t){const e=t-1;return e*e*e+1}function ts(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function St(t,{delay:e=0,duration:i=400,easing:a=ru}={}){const n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:a,css:r=>`opacity: ${r*n}`}}function ua(t,{delay:e=0,duration:i=400,easing:a=Hr,x:n=0,y:r=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,d=s.transform==="none"?"":s.transform,u=c*(1-o),[v,p]=ts(n),[f,b]=ts(r);return{delay:e,duration:i,easing:a,css:(h,_)=>`
|
|
6
6
|
transform: ${d} translate(${(1-h)*v}${p}, ${(1-h)*f}${b});
|
|
7
7
|
opacity: ${c-u*_}`}}function Ba(t,{delay:e=0,duration:i=400,easing:a=Hr,axis:n="y"}={}){const r=getComputedStyle(t),o=+r.opacity,s=n==="y"?"height":"width",c=parseFloat(r[s]),d=n==="y"?["top","bottom"]:["left","right"],u=d.map(g=>`${g[0].toUpperCase()}${g.slice(1)}`),v=parseFloat(r[`padding${u[0]}`]),p=parseFloat(r[`padding${u[1]}`]),f=parseFloat(r[`margin${u[0]}`]),b=parseFloat(r[`margin${u[1]}`]),h=parseFloat(r[`border${u[0]}Width`]),_=parseFloat(r[`border${u[1]}Width`]);return{delay:e,duration:i,easing:a,css:g=>`overflow: hidden;opacity: ${Math.min(g*20,1)*o};${s}: ${g*c}px;padding-${d[0]}: ${g*v}px;padding-${d[1]}: ${g*p}px;margin-${d[0]}: ${g*f}px;margin-${d[1]}: ${g*b}px;border-${d[0]}-width: ${g*h}px;border-${d[1]}-width: ${g*_}px;min-${s}: 0`}}function va(t,{delay:e=0,duration:i=400,easing:a=Hr,start:n=0,opacity:r=0}={}){const o=getComputedStyle(t),s=+o.opacity,c=o.transform==="none"?"":o.transform,d=1-n,u=s*(1-r);return{delay:e,duration:i,easing:a,css:(v,p)=>`
|
|
8
8
|
transform: ${c} scale(${1-d*p});
|
|
9
9
|
opacity: ${s-u*p}
|
|
10
10
|
`}}function pa(t){return t?t.replace("/src/img",""):null}function is(t,e=null){return t!=null&&t.length?`${Td}/${t}?${e?`class=${e}&`:""}optimizer=image`:""}var lu=T('<img class="svelte-p6g2a"/>');function kn(t,e){oe(e,!0);const i=L(e,"width",3,96),a=L(e,"height",3,144),n=L(e,"lazy",3,!0),r=L(e,"onload",3,()=>null);var o=lu();H(s=>{re(o,"src",s),re(o,"alt",`Movie poster for '${e.title.title??""}'`),re(o,"width",i()),re(o,"height",a()),re(o,"loading",n()?"lazy":null)},[()=>pa(e.title.standing_poster)]),ge("error",o,({target:s})=>s.src=Pr),ge("load",o,function(...s){var c;(c=r())==null||c.apply(this,s)}),y(t,o),se()}var ou=Fe('<svg viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Sn(t,e){const i=L(e,"size",3,16);var a=ou();H(()=>{re(a,"width",i()),re(a,"height",i())}),y(t,a)}var su=T('<div class="overlay svelte-f0c4xl"><!> <div class="backdrop svelte-f0c4xl" data-testid="backdrop"></div> <button class="close svelte-f0c4xl" aria-label="Close"><!></button></div>');function cu(t,e){const i=L(e,"embeddable_url",3,"");var a=su(),n=x(a);Ur(n,{get embeddable_url(){return i()},controls:["current-time","fullscreen","mute","play","progress"]});var r=S(n,2);r.__click=function(...c){var d;(d=e.onclose)==null||d.apply(this,c)};var o=S(r,2);o.__click=function(...c){var d;(d=e.onclose)==null||d.apply(this,c)};var s=x(o);Sn(s,{size:24}),Ie(3,a,()=>St,()=>({duration:100})),y(t,a)}xe(["click"]);const du="1304688689641511",uu="https://endpoint-youtube-availability.playpilot.workers.dev";async function as(t){var i,a,n,r;const e=(a=(i=window.PlayPilotLinkInjections)==null?void 0:i.region)==null?void 0:a.toUpperCase();if(!e)return!0;try{const o=await fetch(`${uu}/?video_id=${t}`);if(!o.ok)throw new Error("Response was not ok");const s=await o.json();return!((n=s.blocked)!=null&&n[e]||!s.blocked&&s.allowed&&!((r=s.allowed)!=null&&r.includes(e)))}catch(o){return pe(ve.YouTubeAvailabilityRequestFailed,null,{message:o.message}),!1}}let Tn={};function vu(t){const e=al(),i={onclose:pu,embeddable_url:t.embeddable_url||""};Tn=Lt(cu,{target:e,props:i})}function pu(){Tn&&(Di(Tn,{outro:!0}),Tn=null)}function Vr(t){const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,i=t.match(e);return(i==null?void 0:i[7])||null}async function fu(t,e=3){let i=0,a=null;for(;i<e&&!a;){const n=t[i],r=(n==null?void 0:n.embeddable_url)&&Vr(n.embeddable_url);try{r&&await as(r)&&(a=n)}catch{}i++}return a}var hu=T('<iframe width="600" height="338" title="YouTube video player" frameborder="0" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-1ivh34t"></iframe>');function Ur(t,e){var p;oe(e,!0);const i=L(e,"embeddable_url",3,""),a=L(e,"controls",19,()=>[]),n=L(e,"muted",3,!1),r=L(e,"loop",3,!1),o=V(()=>Vr(i())),s=((p=window==null?void 0:window.getComputedStyle(document.body).getPropertyValue("--playpilot-primary"))==null?void 0:p.replace("#",""))||"fa548a";var c=ye(),d=Q(c);{var u=f=>{var b=hu();H(h=>re(b,"src",`https://video.playpilot.net/?video_id=${l(o)??""}&color=${s}&muted=${n()??""}&loop=${r()??""}&controls=${h??""}&autoplay=true&playsinline=true`),[()=>a().join(",")]),y(f,b)},v=f=>{var b=Qe("Something went wrong");y(f,b)};B(d,f=>{l(o)?f(u):f(v,!1)})}y(t,c),se()}var gu=T('<div tabindex="-1"><div tabindex="0" class="slider-content svelte-1gs8ha8"><!></div></div> <!>',1);function ns(t,e){oe(e,!0);let i=L(e,"gap",3,"0"),a=L(e,"fill",3,!0),n=L(e,"transitionDuration",3,300),r=L(e,"threshold",3,30),o=L(e,"moveThreshold",3,0),s=L(e,"currentIndex",15,0),c=L(e,"shown",31,()=>Ue([])),d=L(e,"sliderWidth",15,0),u=L(e,"currentScrollPosition",15,0),v=L(e,"maxWidth",15,0),p=L(e,"reachedEnd",15,!1),f=L(e,"distanceToEnd",15,0),b=L(e,"passedThreshold",15,!1),h=L(e,"passedMoveThreshold",15,!1),_=L(e,"allowWheel",3,!1),g=L(e,"end",3,()=>null),k=L(e,"change",3,te=>null),w=L(e,"onend",19,g),C=L(e,"onchange",19,k),R=L(e,"onresize",3,()=>null),I=W(!1),z=W(!1),U=0,D=0,P=W(void 0),E=W(void 0),j=null,q=null;Ye(()=>{l(E)&&de(),l(E)&&f(v()-u()-d())}),$e(()=>(ie(),()=>j==null?void 0:j.disconnect()));function F(te){const ce=l(E).children.length,ke=Math.max(0,Math.min(te,ce-1));Z({setIndex:ke}),de()}function Y(){A(z,!0),F(s()),requestAnimationFrame(()=>A(z,!1))}function K(te){le(te.target)&&(te.preventDefault(),U=Se(te),A(I,!0))}function M(){if(l(I)){if(!b())Z({setIndex:s()});else{const te=u()-D,ce=te>0?1:-1;te!=0&&Z({direction:ce})}A(I,!1),b(!1)}}function N(te){if(!l(I))return;const ce=Se(te),ke=D+(U-ce),tt=U-ce;h(Math.abs(tt)>o()),b(Math.abs(u()-D)>r()),h()&&(ne(ke-o()*(tt>0?1:-1)),de())}function G(te){if(!_())return;const{deltaX:ce,deltaY:ke}=te;if(Math.abs(ce)<Math.abs(ke))return;te.preventDefault();const Be=u()+ce*20*.02;ne(Be),de(),q&&clearTimeout(q),q=setTimeout(()=>{Z({direction:ce>0?1:-1})},100)}function J(te){le(document.activeElement)&&(te.key=="ArrowLeft"&&F(s()-1),te.key=="ArrowRight"&&F(s()+1))}function Z({setIndex:te=-1,direction:ce=1}={}){const ke=Ee(),tt=s();s(0);let Be;for(Be=0;Be<ke.length;Be++)if(te!=-1){if(Be>=te)break}else if(ce>0&&ke[Be]>u()||ce<0&&ke[Be+1]>u())break;s(Math.min(Be,$().length-1)),ne(ke[s()],!0),D=u(),C()&&s()!=tt&&C()(s())}function ne(te,ce=!1){u(te);const ke=v()-d();p(u()>=ke),p()&&(w()&&w()(),a()&&ce&&u(ke))}function de(){const te=Ee();Array.from(te).forEach((ce,ke)=>{u()+d()<ce||c().includes(ke)||c([...c(),ke])})}function Se(te){var ce,ke;return te.pageX??((ke=(ce=te.touches)==null?void 0:ce[0])==null?void 0:ke.pageX)}function Ee(){return $().map(te=>te.offsetLeft)}function $(){return Array.from(l(E).children).filter(te=>te instanceof HTMLElement).filter(te=>te.src!="about:blank")}function ie(){j=new ResizeObserver(te=>{for(const ce of te){const ke=Array.isArray(ce.contentBoxSize)?ce.contentBoxSize[0]:ce.contentBoxSize;v(ke.inlineSize)}R()()}),j.observe(l(E))}function le(te){return te===l(P)||(te==null?void 0:te.closest(".slider"))===l(P)}var me={setIndex:F,reposition:Y},Le=gu();ge("mousedown",Pe,K),ge("mouseup",Pe,M),ge("mousemove",Pe,N),ge("touchstart",Pe,K,void 0,!0),ge("touchend",Pe,M),ge("touchmove",Pe,N,void 0,!0),ge("keydown",Pe,J),ge("resize",Pe,Y);var ae=Q(Le);let ee;var fe=x(ae);let Ae;var De=x(fe);He(De,()=>e.children??bt,()=>({sliderWidth:d(),shown:c(),currentIndex:s(),setIndex:F,currentScrollPosition:u(),maxWidth:v(),reachedEnd:p(),distanceToEnd:f()})),rt(fe,te=>A(E,te),()=>l(E)),rt(ae,te=>A(P,te),()=>l(P));var Ke=S(ae,2);return He(Ke,()=>e.controls??bt,()=>({sliderWidth:d(),shown:c(),currentIndex:s(),setIndex:F,currentScrollPosition:u(),maxWidth:v(),reachedEnd:p(),distanceToEnd:f()})),H(te=>{ee=_e(ae,1,"slider svelte-1gs8ha8",null,ee,{dragging:l(I),"passed-threshold":b()}),Ae=We(fe,"",Ae,te)},[()=>({transform:`translateX(${u()*-1}px)`,"transition-duration":`${(l(I)||l(z)?0:n())??""}ms`,"--gap":parseFloat(i()||"0")?i():null})]),ge("wheel",ae,G),Mt(ae,"clientWidth",d),y(t,Le),se(me)}var mu=Fe("<title> </title>"),yu=Fe('<svg viewBox="0 -960 960 960"><!><path d="m288-96-68-68 316-316-316-316 68-68 384 384L288-96Z" fill="currentColor"></path></svg>');function Zt(t,e){const i=L(e,"direction",3,"right"),a=L(e,"title",3,""),n=L(e,"size",3,16);var r=yu(),o=x(r);{var s=c=>{var d=mu(),u=x(d);H(()=>X(u,a())),y(c,d)};B(o,c=>{a()&&c(s)})}H(()=>{_e(r,0,i(),"svelte-1m6nwwy"),re(r,"width",`${n()??""}px`),re(r,"height",`${n()??""}px`)}),y(t,r)}function ze(t,e=1){t.role="heading",t.ariaLevel=e.toString()}var bu=T('<div class="heading svelte-1ayf7b5"> </div>'),_u=T('<button class="arrow left svelte-1ayf7b5" aria-label="Previous" aria-live="polite"><!></button>'),xu=T('<button class="arrow right svelte-1ayf7b5" aria-label="Next" aria-live="polite"><!></button>'),wu=T("<!> <!>",1),ku=T('<!> <div class="rail svelte-1ayf7b5"><!></div>',1);function En(t,e){oe(e,!0);let i=L(e,"heading",3,""),a=L(e,"onchange",3,()=>null),n=L(e,"onresize",3,()=>null),r=L(e,"slider",15);var o=ku(),s=Q(o);{var c=v=>{var p=bu(),f=x(p);mt(p,(b,h)=>ze==null?void 0:ze(b,h),()=>2),H(()=>X(f,i())),y(v,p)};B(s,v=>{i()&&v(c)})}var d=S(s,2),u=x(d);rt(ns(u,{get onchange(){return a()},get onresize(){return n()},allowWheel:!0,controls:(p,f)=>{let b=()=>f==null?void 0:f().setIndex,h=()=>f==null?void 0:f().currentIndex,_=()=>f==null?void 0:f().reachedEnd;var g=wu(),k=Q(g);{var w=I=>{var z=_u();z.__click=()=>b()(h()-1);var U=x(z);Zt(U,{direction:"left",title:"Previous"}),y(I,z)};B(k,I=>{h()>0&&I(w)})}var C=S(k,2);{var R=I=>{var z=xu();z.__click=()=>b()(h()+1);var U=x(z);Zt(U,{title:"Next"}),y(I,z)};B(C,I=>{_()||I(R)})}y(p,g)},children:(p,f)=>{var b=ye(),h=Q(b);He(h,()=>e.children),y(p,b)},$$slots:{controls:!0,default:!0}}),p=>r(p),()=>r()),y(t,o),se()}xe(["click"]);function Wr(t){return`${qo}/${t.type}/${t.slug}/`}var Su=T('<img class="video-fallback svelte-12ph9f6" alt=""/>'),Tu=T('<div class="video svelte-12ph9f6"><a class="video-overlay svelte-12ph9f6" title=""></a> <!></div>'),Eu=T('<a class="poster svelte-12ph9f6"><!></a>'),Pu=T('<div class="aside svelte-12ph9f6" data-testid="aside"> </div>'),Cu=T('<div data-testid="title"><div class="media svelte-12ph9f6"><!></div> <a class="heading svelte-12ph9f6" data-testid="heading"> </a> <!></div>'),Iu=T('<div class="skeleton svelte-12ph9f6"> </div>'),ju=T('<div class="aside svelte-12ph9f6"><div class="aside-skeleton svelte-12ph9f6"></div></div>'),zu=T('<div class="title svelte-12ph9f6" data-testid="skeleton"><div class="poster svelte-12ph9f6"></div> <div class="heading svelte-12ph9f6"><span class="skeleton svelte-12ph9f6"> </span> <span class="skeleton svelte-12ph9f6"> </span></div> <!></div>'),Au=T("<div><!></div>");function rs(t,e){oe(e,!0);let i=L(e,"minimumLength",3,1),a=L(e,"heading",3,""),n=L(e,"size",3,"small"),r=L(e,"aside",3,!1),o=L(e,"expandable",3,!1),s=L(e,"expandedTitle",15,null),c=L(e,"expandedRailKey",15,null),d=L(e,"onclick",3,()=>null),u=L(e,"onexpand",3,()=>null);const v=bn(),f=tr("scope")==="popover"?tr("title"):null;let b=W(null),h=W(null),_=!1;$e(()=>{o()&&C()});function g(P,E,j){var F,Y,K;P==null||P.preventDefault();const q=E[j];if(o()&&!R(q)){const M=(F=l(b))==null?void 0:F.querySelectorAll(".title")[j],G=(((Y=l(b))==null?void 0:Y.getBoundingClientRect().right)||0)-M.getBoundingClientRect().right;_=!0,setTimeout(()=>_=!1,500),G<M.clientWidth*2&&((K=l(h))==null||K.setIndex(j-2)),w(q),P&&u()(q);return}P&&(fa()?xi({event:P,type:"titles-rail",data:E,returnToTitle:f,props:{initialIndex:j}}):xi({event:P,data:q,returnToTitle:f}),d()(q))}async function k(){const P=await e.titles,E=await fu(P);E&&(s()||c()&&c()!==v||w(E))}function w(P){c(v),s(P)}function C(){c()===v||Array.from(document.querySelectorAll('[data-role="expandable-rail"]')).filter(q=>q.getBoundingClientRect().top>=0).sort((q,F)=>q.getBoundingClientRect().top-F.getBoundingClientRect().top)[0]!==l(b)||(s(null),c(null),k())}function R(P){var E;return c()===v&&P.sid===((E=s())==null?void 0:E.sid)}function I(P,E){o()&&(_||setTimeout(()=>g(null,P,E),250))}var z=Au();ge("scroll",Pe,C);let U;var D=x(z);un(D,()=>e.titles,P=>{En(P,{get heading(){return a()},children:(E,j)=>{var q=ye(),F=Q(q);je(F,16,()=>({length:12}),qe,(Y,K)=>{var M=zu(),N=S(x(M),4);{var G=J=>{var Z=ju(),ne=x(Z);je(ne,20,()=>({length:3}),qe,(de,Se)=>{var Ee=Iu();y(de,Ee)}),y(J,Z)};B(N,J=>{r()&&J(G)})}y(Y,M)}),y(E,q)},$$slots:{default:!0}})},(P,E)=>{var j=ye(),q=Q(j);{var F=Y=>{En(Y,{get heading(){return a()},onchange:K=>I(l(E),K),onresize:()=>{var K;return(K=l(h))==null?void 0:K.reposition()},get slider(){return l(h)},set slider(K){A(h,K,!0)},children:(K,M)=>{var N=ye(),G=Q(N);je(G,17,()=>l(E),qe,(J,Z,ne,de)=>{const Se=V(()=>R(l(Z))),Ee=V(()=>Wr(l(Z))),$=V(()=>te=>g(te,l(E),ne));var ie=Cu();let le;var me=x(ie),Le=x(me);{var ae=te=>{var ce=Tu(),ke=x(ce);ke.__click=function(...Ct){var ei;(ei=l($))==null||ei.apply(this,Ct)};var tt=S(ke,2);{var Be=Ct=>{Ur(Ct,{get embeddable_url(){return l(Z).embeddable_url},muted:!0,loop:!0})},fi=Ct=>{var ei=Su();H(()=>re(ei,"src",l(Z).medium_poster)),y(Ct,ei)};B(tt,Ct=>{l(Z).embeddable_url?Ct(Be):Ct(fi,!1)})}H(()=>re(ke,"href",l(Ee))),Ie(2,ce,()=>St,()=>({delay:200,duration:200})),y(te,ce)},ee=te=>{var ce=Eu();ce.__click=function(...tt){var Be;(Be=l($))==null||Be.apply(this,tt)};var ke=x(ce);kn(ke,{get title(){return l(Z)},width:96,height:144}),H(()=>re(ce,"href",l(Ee))),y(te,ce)};B(Le,te=>{l(Se)?te(ae):te(ee,!1)})}var fe=S(me,2);fe.__click=function(...te){var ce;(ce=l($))==null||ce.apply(this,te)};var Ae=x(fe),De=S(fe,2);{var Ke=te=>{var ce=Pu();ce.__click=function(...tt){var Be;(Be=l($))==null||Be.apply(this,tt)};var ke=x(ce);H(()=>X(ke,l(Z).description)),y(te,ce)};B(De,te=>{r()&&te(Ke)})}H(()=>{le=_e(ie,1,"title svelte-12ph9f6",null,le,{expanded:l(Se)}),re(fe,"href",l(Ee)),X(Ae,l(Z).title)}),y(J,ie)}),y(K,N)},$$slots:{default:!0}})};B(q,Y=>{var K;((K=l(E))==null?void 0:K.length)>=i()&&Y(F)})}y(P,j)}),rt(z,P=>A(b,P),()=>l(b)),H(()=>{U=_e(z,1,`titles ${n()??""}`,"svelte-12ph9f6",U,{"with-aside":r()}),re(z,"data-role",o()?"expandable-rail":null)}),y(t,z),se()}xe(["click"]);var Lu=T('<div class="rail svelte-1b834ry"><!></div>'),Mu=T('<div data-testid="explore-home"></div> <!>',1);function qu(t,e){oe(e,!0);let i=W(null),a=W(null);const n=[{heading:"List: Trending",params:{ordering:wn.Popular},properties:{expandable:!0}},{heading:"List: New",params:{from_playlist_sid:"li42WR",include_playable_types:"SVOD,FREE"},properties:{aside:!0}},{heading:"List: Upcoming",params:{from_playlist_sid:"li42wf",region:null,no_region_filter:!0},properties:{}},{heading:"List: Cinema",params:{from_playlist_sid:"li42WS",region:null,no_region_filter:!0},properties:{expandable:!0}},{heading:"List: Demand",params:{from_playlist_sid:"licBS"},properties:{aside:!0}}];async function r(c={}){var d;return(d=await Fr(c))==null?void 0:d.results}var o=Mu();ge("scroll",Pe,onscroll);var s=S(Q(o),2);je(s,17,()=>n,qe,(c,d)=>{let u=()=>l(d).heading,v=()=>l(d).params,p=()=>l(d).properties;var f=Lu(),b=x(f);{let h=V(()=>ue(u())),_=V(()=>r(v()));rs(b,mn({get heading(){return l(h)},get titles(){return l(_)},size:"flexible",minimumLength:7},p,{onclick:()=>pe(ve.ExploreTitleRailModalView,null,{rail:u()}),onexpand:g=>pe(ve.ExploreTitleRailExpandClick,g,{rail:u()}),get expandedTitle(){return l(i)},set expandedTitle(g){A(i,g,!0)},get expandedRailKey(){return l(a)},set expandedRailKey(g){A(a,g,!0)}}))}y(c,f)}),y(t,o),se()}function Pn(t,e={}){const i=new Image;i.src=Du(t,e||{})}function Du(t,e={}){const i=Object.fromEntries(Object.entries(e).map(([r,o])=>[`cd[${r}]`,o])),a={id:du,ev:t,...i};return`https://www.facebook.com/tr?${Object.keys(a).map(r=>r+"="+a[r]).join("&")}`}function ls(t,e={}){return()=>{Ye(()=>Pn(t,e))}}function Ru(t,e={}){return i=>{const a=()=>Pn(t,e);Ye(()=>(i.addEventListener("click",a),()=>i.removeEventListener("click",a)))}}var Nu=T("<button><!></button>");function Fi(t,e){const i=L(e,"variant",3,"filled"),a=L(e,"size",3,"base"),n=L(e,"label",3,null),r=L(e,"active",3,!1);var o=Nu();let s;o.__click=function(...d){var u;(u=e.onclick)==null||u.apply(this,d)};var c=x(o);He(c,()=>e.children??bt),H(()=>{s=_e(o,1,`button ${i()??""} ${a()??""}`,"svelte-5bqh67",s,{active:r()}),re(o,"aria-label",n())}),y(t,o)}xe(["click"]);var Ou=Fe('<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><title>IMDb rating</title><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function Cn(t,e){const i=L(e,"size",3,14);var a=Ou();H(()=>{re(a,"width",i()),re(a,"height",i())}),y(t,a)}function os(t){const e=t.filter(a=>!!a.logo_url);let i=[];for(const a of e){let n=a;const r=i.find(c=>c.name===n.name),o=r==null?void 0:r.extra_info.category,s=n.extra_info.category;(o==="RENT"&&s==="BUY"||o==="BUY"&&s==="RENT")&&(i=i.filter(c=>c.name!==n.name),n={...n,extra_info:{...n.extra_info,category:"TVOD"}}),i.push(n)}return i}var Bu=T('<img alt="" data-playpilot-pixel="" class="svelte-16jzx4f"/>');function Gr(t,e){oe(e,!0);let i=W(Ue(Math.random()));var a=ye();ge("updateconsent",Pe,()=>A(i,Math.random(),!0));var n=Q(a);Ri(n,()=>l(i),r=>{var o=ye(),s=Q(o);{var c=d=>{var u=ye(),v=Q(u);je(v,17,()=>e.pixels,qe,(p,f)=>{var b=Bu();H(()=>re(b,"src",l(f))),y(p,b)}),y(d,u)};B(s,d=>{qt("pixels")&&d(c)})}y(r,o)}),y(t,a),se()}var Fu=T('<a target="_blank" class="playlink svelte-1tx3tz8" rel="sponsored"><img class="svelte-1tx3tz8"/> <!></a>');function Hu(t,e){oe(e,!0);const i=L(e,"size",3,30),a=L(e,"onclick",3,()=>null),n=V(()=>e.playlink.name),r=V(()=>e.playlink.url),o=V(()=>e.playlink.logo_url),s=V(()=>e.playlink.pixels);var c=Fu();c.__click=function(...f){var b;(b=a())==null||b.apply(this,f)};let d;var u=x(c),v=S(u,2);{var p=f=>{Gr(f,{get pixels(){return l(s)}})};B(v,f=>{var b;(b=l(s))!=null&&b.length&&f(p)})}H(f=>{re(c,"href",l(r)),re(c,"data-playlink",l(n)),d=We(c,"",d,{"--size":`${i()??""}px`}),re(u,"src",f),re(u,"alt",l(n)),re(u,"height",i()),re(u,"width",i())},[()=>pa(l(o))]),y(t,c),se()}xe(["click"]);var Vu=T('<span class="more svelte-1plv45z"> </span>'),Uu=T('<div class="empty svelte-1plv45z" data-testid="playlinks-empty">Unavailable to stream</div>'),Wu=T('<div class="playlinks svelte-1plv45z"><!> <!> <!></div>');function ss(t,e){oe(e,!0);const i=L(e,"size",3,30),a=V(()=>os(e.playlinks).slice(0,3));function n(v){v.stopPropagation()}var r=Wu(),o=x(r);je(o,17,()=>l(a),qe,(v,p)=>{Hu(v,{get playlink(){return l(p)},onclick:n,get size(){return i()}})});var s=S(o,2);{var c=v=>{var p=Vu(),f=x(p);H(()=>X(f,`+${e.playlinks.length-l(a).length}`)),y(v,p)};B(s,v=>{e.playlinks.length>l(a).length&&v(c)})}var d=S(s,2);{var u=v=>{var p=Uu();y(v,p)};B(d,v=>{e.playlinks.length||v(u)})}y(t,r),se()}var Gu=T("<div>Series</div>"),Ku=T("<div> </div>"),Yu=T('<button class="title svelte-12igath" data-testid="title"><div class="poster svelte-12igath"><!> <div class="meta svelte-12igath"><div class="imdb svelte-12igath"><!> </div> <!> <!></div></div> <div class="content svelte-12igath"><div class="heading svelte-12igath"> </div> <!></div></button>');function Zu(t,e){oe(e,!0);const i=L(e,"onclick",3,()=>null);var a=Yu();a.__click=function(...k){var w;(w=i())==null||w.apply(this,k)};var n=x(a),r=x(n);kn(r,{get title(){return e.title},width:120,height:213,lazy:!0});var o=S(r,2),s=x(o),c=x(s);Cn(c,{size:12});var d=S(c),u=S(s,2);{var v=k=>{var w=Gu();y(k,w)};B(u,k=>{e.title.type==="series"&&k(v)})}var p=S(u,2);{var f=k=>{var w=Ku(),C=x(w);H(()=>X(C,`${e.title.length??""} min`)),y(k,w)};B(p,k=>{e.title.length&&k(f)})}var b=S(n,2),h=x(b),_=x(h),g=S(h,2);ss(g,{get playlinks(){return e.title.providers},size:20}),H(()=>{X(d,` ${e.title.imdb_score||"-"}`),X(_,e.title.title)}),y(t,a),se()}xe(["click"]),_c();var Ju=T('<div class="skeleton svelte-1uz2nzg" data-testid="skeleton"><div class="poster svelte-1uz2nzg"></div> <div class="lines svelte-1uz2nzg"><div class="line svelte-1uz2nzg"></div></div></div>');function Xu(t){var e=Ju(),i=S(x(e),2),a=x(i);We(a,"",{},{width:"60%"}),y(t,e)}var Qu=T('<div class="svelte-pkkpyl"> </div>'),$u=T('<button class="title svelte-pkkpyl" data-testid="title"><div class="poster svelte-pkkpyl"><!></div> <div class="content svelte-pkkpyl"><div class="heading svelte-pkkpyl"> </div> <div class="meta svelte-pkkpyl"><div class="imdb svelte-pkkpyl"><!> </div> <div class="svelte-pkkpyl"> </div> <div class="svelte-pkkpyl"> </div> <!></div> <div> </div> <!></div> <div class="action svelte-pkkpyl"><!></div></button>');function cs(t,e){var E;oe(e,!0);const i=L(e,"onclick",3,()=>null),a=!!((E=window.PlayPilotLinkInjections)!=null&&E.no_affiliate);var n=$u();n.__click=function(...j){var q;(q=i())==null||q.apply(this,j)};var r=x(n),o=x(r);kn(o,{get title(){return e.title},width:30,height:43,lazy:!0});var s=S(r,2),c=x(s),d=x(c),u=S(c,2),v=x(u),p=x(v);Cn(p,{size:11});var f=S(p),b=S(v,2),h=x(b),_=S(b,2),g=x(_),k=S(_,2);{var w=j=>{var q=Qu(),F=x(q);H(()=>X(F,`${e.title.length??""} min`)),y(j,q)};B(k,j=>{e.title.length&&j(w)})}var C=S(u,2);let R;var I=x(C),z=S(C,2);{var U=j=>{ss(j,{get playlinks(){return e.title.providers}})};B(z,j=>{a||j(U)})}var D=S(s,2),P=x(D);Zt(P,{}),H(j=>{X(d,e.title.title),X(f,` ${e.title.imdb_score||"-"}`),X(h,e.title.year),X(g,j),R=_e(C,1,"description svelte-pkkpyl",null,R,{large:a}),X(I,e.title.description)},[()=>ue(`Type: ${e.title.type}`)]),y(t,n),se()}xe(["click"]);var ev=T('<div class="skeleton svelte-17sb7p8" data-testid="skeleton"><div class="poster svelte-17sb7p8"></div> <div class="lines svelte-17sb7p8"><div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div></div></div>');function tv(t){var e=ev(),i=S(x(e),2),a=x(i);We(a,"",{},{width:"40%"});var n=S(a,2);We(n,"",{},{width:"60%"});var r=S(n,2);We(r,"",{},{width:"80%"}),y(t,e)}const iv=[{label:"Aruba",value:"AW"},{label:"Afghanistan",value:"AF"},{label:"Angola",value:"AO"},{label:"Anguilla",value:"AI"},{label:"Albania",value:"AL"},{label:"Andorra",value:"AD"},{label:"United Arab Emirates",value:"AE"},{label:"Argentina",value:"AR"},{label:"Armenia",value:"AM"},{label:"American Samoa",value:"AS"},{label:"Antigua and Barbuda",value:"AG"},{label:"Australia",value:"AU"},{label:"Austria",value:"AT"},{label:"Azerbaijan",value:"AZ"},{label:"Burundi",value:"BI"},{label:"Belgium",value:"BE"},{label:"Benin",value:"BJ"},{label:"Burkina Faso",value:"BF"},{label:"Bangladesh",value:"BD"},{label:"Bulgaria",value:"BG"},{label:"Bahrain",value:"BH"},{label:"Bahamas",value:"BS"},{label:"Bosnia and Herzegovina",value:"BA"},{label:"Belarus",value:"BY"},{label:"Belize",value:"BZ"},{label:"Bermuda",value:"BM"},{label:"Bolivia",value:"BO"},{label:"Brazil",value:"BR"},{label:"Barbados",value:"BB"},{label:"Brunei",value:"BN"},{label:"Bhutan",value:"BT"},{label:"Botswana",value:"BW"},{label:"Central African Republic",value:"CF"},{label:"Canada",value:"CA"},{label:"Switzerland",value:"CH"},{label:"Chile",value:"CL"},{label:"China",value:"CN"},{label:"Côte d'Ivoire",value:"CI"},{label:"Cameroon",value:"CM"},{label:"DR Congo",value:"CD"},{label:"Congo",value:"CG"},{label:"Cook Islands",value:"CK"},{label:"Colombia",value:"CO"},{label:"Comoros",value:"KM"},{label:"Cabo Verde",value:"CV"},{label:"Costa Rica",value:"CR"},{label:"Cuba",value:"CU"},{label:"Curaçao",value:"CW"},{label:"Cayman Islands",value:"KY"},{label:"Cyprus",value:"CY"},{label:"Czechia",value:"CZ"},{label:"Germany",value:"DE"},{label:"Djibouti",value:"DJ"},{label:"Dominica",value:"DM"},{label:"Denmark",value:"DK"},{label:"Dominican Republic",value:"DO"},{label:"Algeria",value:"DZ"},{label:"Ecuador",value:"EC"},{label:"Egypt",value:"EG"},{label:"Eritrea",value:"ER"},{label:"Spain",value:"ES"},{label:"Estonia",value:"EE"},{label:"Ethiopia",value:"ET"},{label:"Finland",value:"FI"},{label:"Fiji",value:"FJ"},{label:"Falkland Islands",value:"FK"},{label:"France",value:"FR"},{label:"Faroe Islands",value:"FO"},{label:"Micronesia",value:"FM"},{label:"Gabon",value:"GA"},{label:"United Kingdom",value:"GB"},{label:"Georgia",value:"GE"},{label:"Ghana",value:"GH"},{label:"Gibraltar",value:"GI"},{label:"Guinea",value:"GN"},{label:"Guadeloupe",value:"GP"},{label:"Gambia",value:"GM"},{label:"Guinea-Bissau",value:"GW"},{label:"Equatorial Guinea",value:"GQ"},{label:"Greece",value:"GR"},{label:"Grenada",value:"GD"},{label:"Greenland",value:"GL"},{label:"Guatemala",value:"GT"},{label:"Guyana",value:"GY"},{label:"Hong Kong",value:"HK"},{label:"Honduras",value:"HN"},{label:"Croatia",value:"HR"},{label:"Haiti",value:"HT"},{label:"Hungary",value:"HU"},{label:"Indonesia",value:"ID"},{label:"India",value:"IN"},{label:"Ireland",value:"IE"},{label:"Iran",value:"IR"},{label:"Iraq",value:"IQ"},{label:"Iceland",value:"IS"},{label:"Israel",value:"IL"},{label:"Italy",value:"IT"},{label:"Jamaica",value:"JM"},{label:"Jordan",value:"JO"},{label:"Japan",value:"JP"},{label:"Kazakhstan",value:"KZ"},{label:"Kenya",value:"KE"},{label:"Kyrgyzstan",value:"KG"},{label:"Cambodia",value:"KH"},{label:"Kiribati",value:"KI"},{label:"Saint Kitts and Nevis",value:"KN"},{label:"South Korea",value:"KR"},{label:"Kuwait",value:"KW"},{label:"Laos",value:"LA"},{label:"Lebanon",value:"LB"},{label:"Liberia",value:"LR"},{label:"Libya",value:"LY"},{label:"Saint Lucia",value:"LC"},{label:"Liechtenstein",value:"LI"},{label:"Sri Lanka",value:"LK"},{label:"Lesotho",value:"LS"},{label:"Lithuania",value:"LT"},{label:"Luxembourg",value:"LU"},{label:"Latvia",value:"LV"},{label:"Macao",value:"MO"},{label:"Morocco",value:"MA"},{label:"Monaco",value:"MC"},{label:"Moldova",value:"MD"},{label:"Madagascar",value:"MG"},{label:"Maldives",value:"MV"},{label:"Mexico",value:"MX"},{label:"Marshall Islands",value:"MH"},{label:"North Macedonia",value:"MK"},{label:"Mali",value:"ML"},{label:"Malta",value:"MT"},{label:"Myanmar",value:"MM"},{label:"Montenegro",value:"ME"},{label:"Mongolia",value:"MN"},{label:"Mozambique",value:"MZ"},{label:"Mauritania",value:"MR"},{label:"Martinique",value:"MQ"},{label:"Mauritius",value:"MU"},{label:"Malawi",value:"MW"},{label:"Malaysia",value:"MY"},{label:"Namibia",value:"NA"},{label:"New Caledonia",value:"NC"},{label:"Niger",value:"NE"},{label:"Nigeria",value:"NG"},{label:"Nicaragua",value:"NI"},{label:"Niue",value:"NU"},{label:"Netherlands",value:"NL"},{label:"Norway",value:"NO"},{label:"Nepal",value:"NP"},{label:"Nauru",value:"NR"},{label:"New Zealand",value:"NZ"},{label:"Oman",value:"OM"},{label:"Pakistan",value:"PK"},{label:"Panama",value:"PA"},{label:"Peru",value:"PE"},{label:"Philippines",value:"PH"},{label:"Palau",value:"PW"},{label:"Papua New Guinea",value:"PG"},{label:"Poland",value:"PL"},{label:"Puerto Rico",value:"PR"},{label:"North Korea",value:"KP"},{label:"Portugal",value:"PT"},{label:"Paraguay",value:"PY"},{label:"Palestine",value:"PS"},{label:"French Polynesia",value:"PF"},{label:"Qatar",value:"QA"},{label:"Romania",value:"RO"},{label:"Russian Federation",value:"RU"},{label:"Rwanda",value:"RW"},{label:"Saudi Arabia",value:"SA"},{label:"Sudan",value:"SD"},{label:"Senegal",value:"SN"},{label:"Singapore",value:"SG"},{label:"Solomon Islands",value:"SB"},{label:"Sierra Leone",value:"SL"},{label:"El Salvador",value:"SV"},{label:"San Marino",value:"SM"},{label:"Somalia",value:"SO"},{label:"Serbia",value:"RS"},{label:"South Sudan",value:"SS"},{label:"São Tomé and Príncipe",value:"ST"},{label:"Suriname",value:"SR"},{label:"Slovakia",value:"SK"},{label:"Slovenia",value:"SI"},{label:"Sweden",value:"SE"},{label:"Eswatini",value:"SZ"},{label:"Seychelles",value:"SC"},{label:"Syria",value:"SY"},{label:"Chad",value:"TD"},{label:"Togo",value:"TG"},{label:"Thailand",value:"TH"},{label:"Tajikistan",value:"TJ"},{label:"Turkmenistan",value:"TM"},{label:"Timor-Leste",value:"TL"},{label:"Tonga",value:"TO"},{label:"Trinidad and Tobago",value:"TT"},{label:"Tunisia",value:"TN"},{label:"Turkey",value:"TR"},{label:"Tuvalu",value:"TV"},{label:"Taiwan",value:"TW"},{label:"Tanzania",value:"TZ"},{label:"Uganda",value:"UG"},{label:"Ukraine",value:"UA"},{label:"Uruguay",value:"UY"},{label:"United States",value:"US"},{label:"Uzbekistan",value:"UZ"},{label:"Saint Vincent and the Grenadines",value:"VC"},{label:"Venezuela",value:"VE"},{label:"Vietnam",value:"VN"},{label:"Vanuatu",value:"VU"},{label:"Samoa",value:"WS"},{label:"Yemen",value:"YE"},{label:"South Africa",value:"ZA"},{label:"Zambia",value:"ZM"},{label:"Zimbabwe",value:"ZW"}];async function av(){const t=ui();if(!t)throw new Error("No token was provided");const e={region:await Br(),page:1,include_count:"false"};return await Yt(`/providers/?api-token=${t}&`+qr(e))}function nv(t){const e=t-1;return e*e*e+1}function rv(t,{from:e,to:i},a={}){var{delay:n=0,duration:r=I=>Math.sqrt(I)*120,easing:o=nv}=a,s=getComputedStyle(t),c=s.transform==="none"?"":s.transform,[d,u]=s.transformOrigin.split(" ").map(parseFloat);d/=t.clientWidth,u/=t.clientHeight;var v=lv(t),p=t.clientWidth/i.width/v,f=t.clientHeight/i.height/v,b=e.left+e.width*d,h=e.top+e.height*u,_=i.left+i.width*d,g=i.top+i.height*u,k=(b-_)*p,w=(h-g)*f,C=e.width/i.width,R=e.height/i.height;return{delay:n,duration:typeof r=="function"?r(Math.sqrt(k*k+w*w)):r,easing:o,css:(I,z)=>{var U=z*k,D=z*w,P=I+z*C,E=I+z*R;return`transform: ${c} translate(${U}px, ${D}px) scale(${P}, ${E});`}}}function lv(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,i=1;e!==null;)i*=+getComputedStyle(e).zoom,e=e.parentElement;return i}var ov=Fe('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M200-440v-80h560v80H200Z" fill="currentColor"></path></svg>');function sv(t){var e=ov();y(t,e)}var cv=Fe('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" fill="currentColor"></path></svg>');function dv(t){var e=cv();y(t,e)}var uv=T('<div class="icon svelte-dfwzqz"><!></div>'),vv=T('<div><button> <div class="action svelte-dfwzqz"><!></div></button></div>'),pv=T('<div class="header svelte-dfwzqz"><input type="text" class="input svelte-dfwzqz" aria-label="Search"/></div> <div class="options" data-testid="toggles-with-search"></div>',1);function fv(t,e){oe(e,!0);let i=L(e,"options",19,()=>[{label:"Label",value:"Value"}]),a=L(e,"selected",23,()=>[]),n=L(e,"placeholder",19,()=>`${ue("Search")}...`),r=L(e,"onchange",3,()=>null),o=W("");const s=V(c);function c(){var b;return(b=i())!=null&&b.length?l(o)?i().filter(({label:h})=>h.toLowerCase().indexOf(l(o).toLowerCase())!==-1):i():[]}function d(b){const h=a().find(_=>_===b);a(h?a().filter(_=>_!==b):[...a(),b]),r()(a())}var u=pv(),v=Q(u),p=x(v),f=S(v,2);je(f,29,()=>l(s)||[],({label:b,value:h})=>h,(b,h)=>{let _=()=>l(h).label,g=()=>l(h).value;const k=V(()=>!!a().find(D=>D===g()));var w=vv(),C=x(w);let R;C.__click=()=>d(g());var I=x(C),z=S(I),U=x(z);Ri(U,()=>l(k),D=>{var P=uv(),E=x(P);{var j=F=>{sv(F)},q=F=>{dv(F)};B(E,F=>{l(k)?F(j):F(q,!1)})}Ie(3,P,()=>va,()=>({start:.25,duration:100})),y(D,P)}),H(()=>{R=_e(C,1,"option svelte-dfwzqz",null,R,{active:l(k)}),X(I,`${_()??""} `)}),md(w,()=>rv,()=>({duration:150})),y(b,w)}),H(()=>re(p,"placeholder",n())),ca(p,()=>l(o),b=>A(o,b)),y(t,u),se()}xe(["click"]);var hv=T('<div class="content playpilot-styled-scrollbar svelte-fg0dzp"><!></div>'),gv=T("<div><!> <!></div>");function ds(t,e){oe(e,!0);let i=W(!1),a=W(null),n=W(null),r=W("left"),o=W(0),s=W(0);function c(h){const _=h.target;_&&_.closest(".dropdown")!==l(a)&&A(i,!1)}function d(h){A(i,!l(i)),l(i)&&(A(s,0),A(o,0),u(h.target))}async function u(h){if(await Ma(),!l(n))return;const _=16,g=200,k=window.innerHeight,w=window.innerWidth,{top:C}=l(n).getBoundingClientRect(),{left:R}=h.getBoundingClientRect();A(r,R<window.innerWidth/2?"left":"right",!0),A(o,Math.max(Math.min(window.innerHeight-C-_,k*.6),g),!0),await Ma();const{left:I,right:z}=l(n).getBoundingClientRect(),U=w-z;I-_<0?A(s,U):U-_<0&&A(s,U-_)}var v=gv();ge("click",Pe,c);var p=x(v);He(p,()=>e.button,()=>({toggle:d}));var f=S(p,2);{var b=h=>{var _=hv();let g;var k=x(_);He(k,()=>e.content),rt(_,w=>A(n,w),()=>l(n)),H(()=>g=We(_,"",g,{"--max-height":l(o)?`${l(o)}px`:null,"--offset":l(s)?`${l(s)}px`:null})),Ie(3,_,()=>va,()=>({start:.85,duration:100})),y(h,_)};B(f,h=>{l(i)&&h(b)})}rt(v,h=>A(a,h),()=>l(a)),H(()=>_e(v,1,`dropdown ${l(r)??""}`,"svelte-fg0dzp")),y(t,v),se()}var mv=T('<span class="label svelte-1mfj6k7"> </span>'),yv=T('<div class="active-line svelte-1mfj6k7"></div>'),bv=T('<div class="slider svelte-1mfj6k7"><!> <span><input type="range" id="lower"/> <input type="range" id="upper"/> <div class="value-marker svelte-1mfj6k7"> </div> <div class="value-marker right svelte-1mfj6k7"> </div> <!></span></div>');function _v(t,e){oe(e,!0);const i=L(e,"range",19,()=>[0,100]),a=L(e,"value",19,i),n=L(e,"label",3,""),r=L(e,"valueAppend",3,""),o=L(e,"formatFunction",3,M=>M.toString()),s=L(e,"onchange",3,()=>null);let c=i(),d=V(()=>ka(c,2)),u=W(Ue(l(d)[0])),v=W(Ue(l(d)[1]));const p=V(()=>l(u)!==i()[0]||l(v)!==i()[1]),f=V(()=>100/(i()[1]-i()[0])*(l(u)-i()[0])),b=V(()=>100+100/(i()[1]-i()[0])*(l(v)-i()[1])-l(f)),h=V(()=>Math.abs(i()[0]-i()[1])>10&&Math.abs(l(u)-l(v))<5);Ye(()=>{_(a())}),Ye(()=>{A(v,Math.max(l(v),l(u)+1),!0),A(v,Math.min(l(v),i()[1]),!0),A(u,Math.min(l(u),l(v)-1),!0),A(u,Math.max(l(u),i()[0]),!0)});function _(M){(N=>{var G=ka(N,2);A(u,G[0],!0),A(v,G[1],!0)})(M)}function g(){requestAnimationFrame(()=>s()([l(u),l(v)]))}var k=bv(),w=x(k);{var C=M=>{var N=mv(),G=x(N);H((J,Z)=>X(G,`${n()??""}: ${J??""}—${Z??""} ${r()??""}`),[()=>o()(l(u)),()=>o()(l(v))]),y(M,N)};B(w,M=>{n()&&M(C)})}var R=S(w,2);let I;var z=x(R);z.__mouseup=g,z.__touchend=g,z.__input=function(...M){};let U;var D=S(z,2);D.__mouseup=g,D.__touchend=g,D.__input=function(...M){};let P;var E=S(D,2),j=x(E),q=S(E,2),F=x(q),Y=S(q,2);{var K=M=>{var N=yv();let G;H(()=>G=We(N,"",G,{left:l(f)+"%","--width":l(b)+"%"})),y(M,N)};B(Y,M=>{l(p)&&M(K)})}H(()=>{I=_e(R,1,"range svelte-1mfj6k7",null,I,{halved:l(h)}),re(z,"min",i()[0]),re(z,"max",i()[1]),U=_e(z,1,"svelte-1mfj6k7",null,U,{active:l(p)}),re(D,"min",i()[0]),re(D,"max",i()[1]),P=_e(D,1,"svelte-1mfj6k7",null,P,{active:l(p)}),X(j,l(u)),X(F,l(v))}),ca(z,()=>l(u),M=>A(u,M)),ca(D,()=>l(v),M=>A(v,M)),y(t,k),se()}xe(["mouseup","touchend","input"]);var xv=T(" <!>",1),wv=T('<p class="loading"> </p>'),kv=T('<p class="error"> </p>'),Sv=T('<div class="content svelte-er0ukh" data-testid="content"><!> <!></div>'),Tv=T('<div data-testid="filter-item"><!></div>');function Ev(t,e){oe(e,!0);let i=L(e,"filter",7),a=L(e,"onchange",3,()=>null),n=L(e,"data",7,null),r=L(e,"fetchData",3,null),o=L(e,"range",3,null),s=L(e,"valueAppend",3,"");const c=V(()=>{if(!i()[e.param])return!1;const{type:h,value:_}=i()[e.param];return!(h==="array"&&!_.length||h==="range"&&JSON.stringify(_)===JSON.stringify(o()))});let d=W(!!r());Ye(()=>{!n()&&r()&&u()});async function u(){try{A(d,!0),n(await r()())}catch{pe(ve.ExploreFetchProvidersFailed)}finally{A(d,!1)}}function v(h,_){if(pe(ve.ExploreSetFilter,null,{key:e.param,value:h,total_filter:i()}),!h){delete i()[e.param];return}i()[e.param]={type:_,value:h},a()()}var p=Tv();let f;var b=x(p);ds(b,{button:(g,k)=>{let w=()=>k==null?void 0:k().toggle;Fi(g,{variant:"border",size:"large",get active(){return l(c)},get onclick(){return w()},children:(C,R)=>{var I=xv(),z=Q(I),U=S(z);Zt(U,{direction:"down"}),H(()=>X(z,`${e.label??""} `)),y(C,I)},$$slots:{default:!0}})},content:g=>{var k=Sv(),w=x(k);{var C=D=>{var P=wv(),E=x(P);H(j=>X(E,`${j??""}...`),[()=>ue("Loading")]),y(D,P)},R=D=>{var P=ye(),E=Q(P);{var j=q=>{var F=kv(),Y=x(F);H(K=>X(Y,K),[()=>ue("An Error Occurred")]),y(q,F)};B(E,q=>{r()&&!n()&&q(j)},!0)}y(D,P)};B(w,D=>{l(d)?D(C):D(R,!1)})}var I=S(w,2);{var z=D=>{const P=V(()=>{var E;return(E=i()[e.param])==null?void 0:E.value});fv(D,{get options(){return n()},get selected(){return l(P)},onchange:E=>v(E,"array")})},U=D=>{var P=ye(),E=Q(P);{var j=q=>{const F=V(()=>{var Y;return(Y=i()[e.param])==null?void 0:Y.value});_v(q,{get range(){return o()},get value(){return l(F)},get label(){return e.label},get valueAppend(){return s()},onchange:Y=>v(Y,"range")})};B(E,q=>{o()&&q(j)},!0)}y(D,P)};B(I,D=>{n()?D(z):D(U,!1)})}y(g,k)},$$slots:{button:!0,content:!0}}),H(()=>f=_e(p,1,"filter-item svelte-er0ukh",null,f,{active:l(c)})),y(t,p),se()}var Pv=T(" <!>",1),Cv=T("<button> </button>"),Iv=T('<div class="content svelte-1ibt2k4" data-testid="content"></div>');function jv(t,e){oe(e,!0);const i=L(e,"filter",7),a=L(e,"onchange",3,()=>null),n="ordering",r=[{label:"Popularity",value:wn.Popular},{label:"New",value:wn.New},{label:"Top Rated",value:wn.Best}],o=V(()=>{var c;return((c=r.find(({value:d})=>{var u;return d===((u=i()[n])==null?void 0:u.value)}))==null?void 0:c.label)||"Sort By"});function s(c){c?i()[n]={type:"string",value:c}:delete i()[n],a()()}ds(t,{button:(u,v)=>{let p=()=>v==null?void 0:v().toggle;Fi(u,{variant:"link",get onclick(){return p()},children:(f,b)=>{var h=Pv(),_=Q(h),g=S(_);Zt(g,{direction:"down"}),H(k=>X(_,`${k??""} `),[()=>ue(l(o))]),y(f,h)},$$slots:{default:!0}})},content:u=>{var v=Iv();je(v,21,()=>r,qe,(p,f,b,h)=>{let _=()=>l(f).label,g=()=>l(f).value;const k=V(()=>{var I;return g()===((I=i()[n])==null?void 0:I.value)});var w=Cv();let C;w.__click=()=>s(g());var R=x(w);H(I=>{C=_e(w,1,"option svelte-1ibt2k4",null,C,{active:l(k)}),X(R,I)},[()=>ue(_())]),y(p,w)}),y(u,v)},$$slots:{button:!0,content:!0}}),se()}xe(["click"]);var zv=Fe('<svg width="11" height="13" viewBox="0 0 11 13"><path d="M9.77037 6.86774C9.68778 7.21645 9.48992 7.52709 9.20883 7.74937C8.92774 7.97166 8.57987 8.09259 8.22151 8.09259C7.86315 8.09259 7.51528 7.97166 7.23419 7.74937C6.9531 7.52709 6.75525 7.21645 6.67265 6.86774L0.385491 6.86774C0.335766 6.87014 0.286069 6.86243 0.239415 6.84505C0.192761 6.82768 0.150121 6.80101 0.114079 6.76667C0.0780373 6.73233 0.0493441 6.69103 0.0297394 6.64527C0.0101337 6.5995 2.67029e-05 6.55024 2.67029e-05 6.50045C2.67029e-05 6.45067 0.0101337 6.40141 0.0297394 6.35565C0.0493441 6.30989 0.0780373 6.26858 0.114079 6.23424C0.150121 6.1999 0.192761 6.17323 0.239415 6.15586C0.286069 6.13849 0.335766 6.13077 0.385491 6.13317L6.67265 6.13317C6.75525 5.78446 6.9531 5.47382 7.23419 5.25154C7.51528 5.02925 7.86315 4.90833 8.22151 4.90833C8.57987 4.90833 8.92774 5.02925 9.20883 5.25154C9.48992 5.47382 9.68778 5.78446 9.77037 6.13317H10.1801C10.2298 6.13077 10.2795 6.13849 10.3262 6.15586C10.3728 6.17323 10.4155 6.1999 10.4515 6.23424C10.4875 6.26858 10.5162 6.30989 10.5358 6.35565C10.5554 6.40141 10.5656 6.45067 10.5656 6.50045C10.5656 6.55024 10.5554 6.5995 10.5358 6.64527C10.5162 6.69103 10.4875 6.73233 10.4515 6.76667C10.4155 6.80101 10.3728 6.82768 10.3262 6.84505C10.2795 6.86243 10.2298 6.87014 10.1801 6.86774H9.77037ZM8.22151 5.64374C8.05198 5.64374 7.88626 5.69401 7.74531 5.7882C7.60435 5.88238 7.49449 6.01625 7.42961 6.17287C7.36474 6.32949 7.34776 6.50183 7.38084 6.6681C7.41391 6.83437 7.49554 6.9871 7.61542 7.10698C7.73529 7.22685 7.88802 7.30849 8.05429 7.34156C8.22056 7.37463 8.3929 7.35766 8.54953 7.29278C8.70615 7.22791 8.84002 7.11805 8.9342 6.97709C9.02839 6.83613 9.07866 6.67041 9.07866 6.50089C9.07877 6.38825 9.05668 6.2767 9.01366 6.17261C8.97063 6.06851 8.90751 5.97392 8.82791 5.89424C8.7483 5.81455 8.65377 5.75134 8.54973 5.70821C8.44568 5.66508 8.33415 5.64288 8.22151 5.64288V5.64374Z" fill="currentColor"></path><path d="M3.8929 2.45945C3.8103 2.80816 3.61245 3.11879 3.33136 3.34108C3.05027 3.56336 2.7024 3.68429 2.34404 3.68429C1.98568 3.68429 1.63781 3.56336 1.35672 3.34108C1.07563 3.11879 0.87778 2.80816 0.795181 2.45945H0.385466C0.291124 2.45489 0.202153 2.4142 0.136997 2.34582C0.0718422 2.27744 0.0354977 2.18661 0.0354977 2.09216C0.0354977 1.99771 0.0718422 1.90688 0.136997 1.8385C0.202153 1.77012 0.291124 1.72943 0.385466 1.72488H0.795181C0.87778 1.37617 1.07563 1.06553 1.35672 0.843245C1.63781 0.620959 1.98568 0.500031 2.34404 0.500031C2.7024 0.500031 3.05027 0.620959 3.33136 0.843245C3.61245 1.06553 3.8103 1.37617 3.8929 1.72488L10.1801 1.72488C10.2744 1.72943 10.3634 1.77012 10.4285 1.8385C10.4937 1.90688 10.53 1.99771 10.53 2.09216C10.53 2.18661 10.4937 2.27744 10.4285 2.34582C10.3634 2.4142 10.2744 2.45489 10.1801 2.45945L3.8929 2.45945ZM2.34404 1.23544C2.17451 1.23544 2.00879 1.28572 1.86784 1.3799C1.72688 1.47408 1.61702 1.60795 1.55214 1.76458C1.48727 1.9212 1.47029 2.09354 1.50337 2.25981C1.53644 2.42608 1.61807 2.57881 1.73795 2.69868C1.85782 2.81856 2.01055 2.90019 2.17682 2.93327C2.34309 2.96634 2.51543 2.94936 2.67206 2.88449C2.82868 2.81961 2.96255 2.70975 3.05673 2.56879C3.15092 2.42784 3.20119 2.26212 3.20119 2.09259C3.2013 1.97996 3.17921 1.8684 3.13619 1.76431C3.09316 1.66022 3.03004 1.56563 2.95044 1.48594C2.87083 1.40626 2.77631 1.34304 2.67226 1.29992C2.56821 1.25679 2.45668 1.23459 2.34404 1.23459V1.23544Z" fill="currentColor"></path><path d="M6.0975 11.2752C6.01491 11.6239 5.81705 11.9345 5.53596 12.1568C5.25488 12.3791 4.907 12.5 4.54864 12.5C4.19028 12.5 3.84241 12.3791 3.56132 12.1568C3.28024 11.9345 3.08238 11.6239 2.99978 11.2752H0.385491C0.335766 11.2776 0.286069 11.2699 0.239415 11.2525C0.192761 11.2351 0.150121 11.2085 0.114079 11.1741C0.0780373 11.1398 0.0493441 11.0985 0.0297394 11.0527C0.0101337 11.0069 2.67029e-05 10.9577 2.67029e-05 10.9079C2.67029e-05 10.8581 0.0101337 10.8088 0.0297394 10.7631C0.0493441 10.7173 0.0780373 10.676 0.114079 10.6417C0.150121 10.6073 0.192761 10.5807 0.239415 10.5633C0.286069 10.5459 0.335766 10.5382 0.385491 10.5406H2.99978C3.08238 10.1919 3.28024 9.88126 3.56132 9.65898C3.84241 9.43669 4.19028 9.31577 4.54864 9.31577C4.907 9.31577 5.25488 9.43669 5.53596 9.65898C5.81705 9.88126 6.01491 10.1919 6.0975 10.5406H10.1801C10.2298 10.5382 10.2795 10.5459 10.3262 10.5633C10.3728 10.5807 10.4155 10.6073 10.4515 10.6417C10.4875 10.676 10.5162 10.7173 10.5358 10.7631C10.5554 10.8088 10.5656 10.8581 10.5656 10.9079C10.5656 10.9577 10.5554 11.0069 10.5358 11.0527C10.5162 11.0985 10.4875 11.1398 10.4515 11.1741C10.4155 11.2085 10.3728 11.2351 10.3262 11.2525C10.2795 11.2699 10.2298 11.2776 10.1801 11.2752H6.0975ZM4.54779 10.0503C4.37826 10.0503 4.21254 10.1006 4.07158 10.1948C3.93063 10.289 3.82077 10.4228 3.75589 10.5795C3.69101 10.7361 3.67404 10.9084 3.70711 11.0747C3.74018 11.241 3.82182 11.3937 3.94169 11.5136C4.06157 11.6334 4.2143 11.7151 4.38057 11.7481C4.54684 11.7812 4.71918 11.7642 4.8758 11.6994C5.03242 11.6345 5.16629 11.5246 5.26048 11.3837C5.35466 11.2427 5.40493 11.077 5.40493 10.9075C5.40493 10.6801 5.31463 10.4621 5.15388 10.3014C4.99313 10.1406 4.77512 10.0503 4.54779 10.0503Z" fill="currentColor"></path></svg>');function Av(t){var e=zv();y(t,e)}var Lv=T("<div><!></div>"),Mv=T("<!> <!>",1),qv=T('<div class="sorting"><!></div>'),Dv=T('<div role="navigation"><div class="items svelte-11dg01g"></div> <div class="actions svelte-11dg01g"><!> <!></div></div>');function Rv(t,e){oe(e,!0);const i=L(e,"onchange",3,()=>null),a=L(e,"limit",3,!0),n=L(e,"showSorting",3,!0),r=3,o=[{label:ue("Services"),param:"providers",fetchData:async()=>(await av()).map(_=>({label:_.name,value:_.slug}))},{label:ue("Genres"),param:"genres",data:Nr.map(_=>({label:_.name,value:_.slug}))},{label:ue("IMDb"),param:"imdb_score",range:[0,10]},{label:ue("Year"),param:"year",range:[1900,new Date().getFullYear()]},{label:ue("Runtime"),param:"length",range:[0,180],valueAppend:ue("Minutes")},{label:ue("Countries"),param:"country_codes",data:iv}];let s=W(Ue(a()));var c=Dv();let d;var u=x(c);je(u,21,()=>l(s)?o.slice(0,r):o,qe,(_,g)=>{var k=Lv(),w=x(k);Ev(w,mn({get filter(){return e.filter},get onchange(){return i()}},()=>l(g))),Ie(3,k,()=>va,()=>({start:.75,duration:100})),y(_,k)});var v=S(u,2),p=x(v);{var f=_=>{Fi(_,{variant:"link",onclick:()=>A(s,!l(s)),children:(g,k)=>{var w=Mv(),C=Q(w);Av(C);var R=S(C),I=S(R);{let z=V(()=>l(s)?"down":"up");Zt(I,{get direction(){return l(z)}})}H(z=>X(R,` ${z??""} `),[()=>ue("All Filters")]),y(g,w)},$$slots:{default:!0}})};B(p,_=>{a()&&_(f)})}var b=S(p,2);{var h=_=>{var g=qv(),k=x(g);jv(k,{get filter(){return e.filter},get onchange(){return i()}}),Ie(3,g,()=>ua,()=>({x:5,duration:100})),y(_,g)};B(b,_=>{n()&&_(h)})}H(()=>d=_e(c,1,"filter svelte-11dg01g",null,d,{limit:a()})),y(t,c),se()}var Nv=T(`<div class="empty svelte-4bt48"><p class="svelte-4bt48"><strong class="svelte-4bt48">No results were found</strong><br/> Sorry, we couldn't find anything matching your filter.</p></div>`);function Ov(t){var e=Nv();y(t,e)}var Bv=T('<div class="filter svelte-qc99of"><!></div>'),Fv=T("<div><!></div>"),Hv=T("<!> <!>",1),Vv=T("<p>Something went wrong</p>"),Uv=T('<!> <div role="main" data-testid="explore-results"><!> <!></div> <!>',1);function Wv(t,e){oe(e,!0);const i=L(e,"searchQuery",3,""),a=Ue({});let n=W(Ue([])),r=W(1),o=null,s=0,c=W(Ue(b())),d=W(0);const u=V(()=>l(d)>500),v=V(()=>l(d)>1400?8:l(d)>900?6:l(d)>600?4:3),p=V(()=>l(u)?Zu:cs),f=V(()=>l(u)?Xu:tv);Ye(()=>{(i()||s!=0)&&h(i())});async function b(){s+=1;const j=s,q={page_size:24,page:l(r)};i()&&(q.search=i()),Object.entries(a).forEach(([Y,{type:K,value:M}])=>{if(K==="string")q[Y]=M;else if(K==="array")q[Y]=M.join(",");else if(K==="range"){const[N,G]=M;q[Y+"_min"]=N,q[Y+"_max"]=G}});const F=await Fr(q)||{next:null,previous:null,results:[]};return j===s&&A(n,[...l(n),...F.results],!0),F}async function h(j){o&&clearTimeout(o),o=setTimeout(()=>{g(),A(c,b(),!0),j&&(pe(ve.ExploreSearch,null,{query:j}),qt("pixels")&&Pn(Na.SearchQuery,{query:j}))},100)}function _(){g(),A(c,b(),!0)}function g(){A(r,1),A(n,[],!0)}function k(){Ac(r),A(c,b(),!0),pe(ve.ExploreShowMore,null,{page:l(r)})}function w(j,q){xi({event:j,data:q}),pe(ve.ExploreTitleClick,q)}var C=Uv(),R=Q(C);Ri(R,()=>l(u),j=>{var q=Bv(),F=x(q);{let Y=V(()=>!l(u)),K=V(()=>!i());Rv(F,{get filter(){return a},get limit(){return l(Y)},onchange:_,get showSorting(){return l(K)}})}y(j,q)});var I=S(R,2);let z,U;var D=x(I);je(D,17,()=>l(n),qe,(j,q)=>{var F=ye(),Y=Q(F);Ri(Y,()=>l(q).sid,K=>{var M=ye(),N=Q(M);mr(N,()=>l(p),(G,J)=>{J(G,{get title(){return l(q)},onclick:Z=>w(Z,l(q))})}),y(K,M)}),y(j,F)});var P=S(D,2);un(P,()=>l(c),j=>{var q=ye(),F=Q(q);je(F,16,()=>({length:24}),qe,(Y,K)=>{var M=ye(),N=Q(M);mr(N,()=>l(f),(G,J)=>{J(G,{})}),y(Y,M)}),y(j,q)},void 0,j=>{});var E=S(I,2);un(E,()=>l(c),null,(j,q)=>{var F=V(()=>{var{next:Z}=l(q);return{next:Z}}),Y=V(()=>l(F).next),K=Hv(),M=Q(K);{var N=Z=>{var ne=Fv();let de;var Se=x(ne);Fi(Se,{size:"large",onclick:k,children:(Ee,$)=>{var ie=Qe();H(le=>X(ie,le),[()=>ue("Show More")]),y(Ee,ie)},$$slots:{default:!0}}),H(()=>de=_e(ne,1,"show-more svelte-qc99of",null,de,{grid:l(u)})),y(Z,ne)};B(M,Z=>{l(Y)&&Z(N)})}var G=S(M,2);{var J=Z=>{Ov(Z)};B(G,Z=>{var ne;!((ne=l(n))!=null&&ne.length)&&l(r)===1&&Z(J)})}y(j,K)},j=>{var q=Vv();y(j,q)}),H(()=>{z=_e(I,1,"titles svelte-qc99of",null,z,{grid:l(u)}),U=We(I,"",U,{"--grid-columns":l(v)})}),Mt(I,"clientWidth",j=>A(d,j)),y(t,C),se()}var Gv=Fe('<svg width="18" height="18" viewBox="0 0 19 19"><path fill="currentColor" d="M16.593,2.407a8.155,8.155,0,0,0-11.569,0A8.166,8.166,0,0,0,4.18,12.983L.38,16.8a1.3,1.3,0,0,0,0,1.837A1.372,1.372,0,0,0,1.288,19a1.3,1.3,0,0,0,.908-.38L6.017,14.8A8.172,8.172,0,0,0,16.593,2.407ZM15.327,12.688A6.4,6.4,0,1,1,17.184,8.17,6.324,6.324,0,0,1,15.327,12.688Z"></path></svg>');function Kv(t){var e=Gv();y(t,e)}var Yv=T('<div class="search svelte-1pnrmr6" role="search"><div class="icon svelte-1pnrmr6"><!></div> <input class="input svelte-1pnrmr6" type="search"/></div>');function Zv(t,e){oe(e,!0);let i=W("");var a=Yv(),n=x(a),r=x(n);Kv(r);var o=S(n,2);o.__input=()=>e.oninput(l(i)),H(s=>re(o,"placeholder",s),[()=>ue("Search Movies And Shows")]),ca(o,()=>l(i),s=>A(i,s)),y(t,a),se()}xe(["input"]);var Jv=T('<p class="description svelte-l2apr8"> </p>'),Xv=T('<div class="navigation svelte-l2apr8" role="navigation"></div>'),Qv=T('<div class="explore playpilot-styled-scrollbar svelte-l2apr8"><div class="header svelte-l2apr8" role="banner"><div><div class="divider svelte-l2apr8"></div> <div class="heading svelte-l2apr8"> </div> <!></div></div> <!> <!> <!></div>');function $v(t,e){oe(e,!0);let i=L(e,"navigate",3,()=>null),a=L(e,"searchQuery",15,""),n=null,r=W(null),o=W(0);Ye(()=>{var w;A(r,((w=n==null?void 0:n.closest(Kr))==null?void 0:w.style.height)||null,!0)}),$e(async()=>{var w;pe(ve.ExplorePageView),(w=window.PlayPilotLinkInjections.ads)!=null&&w.length||(window.PlayPilotLinkInjections.ads=await es())});var s=Qv();let c;var d=x(s),u=x(d),v=S(x(u),2),p=x(v);mt(v,w=>ze==null?void 0:ze(w));var f=S(v,2);{var b=w=>{var C=Jv(),R=x(C);H(I=>X(R,I),[()=>ue("Streaming Guide Description")]),y(w,C)};B(f,w=>{fa()||w(b)})}var h=S(d,2);{var _=w=>{var C=Xv();je(C,21,()=>e.routes,qe,(R,I)=>{{let z=V(()=>e.currentRoute.key===l(I).key);Fi(R,{variant:"border",size:"large",get active(){return l(z)},onclick:()=>i()(l(I)),children:(U,D)=>{var P=Qe();H(E=>X(P,E),[()=>ue(l(I).label)]),y(U,P)},$$slots:{default:!0}})}}),y(w,C)};B(h,w=>{fa()&&w(_)})}var g=S(h,2);Zv(g,{oninput:w=>a(w)});var k=S(g,2);He(k,()=>e.children),rt(s,w=>n=w,()=>n),H(w=>{c=We(s,"",c,{height:l(r),"--playpilot-explore-width":`${l(o)??""}px`}),X(p,w)},[()=>ue("Streaming Guide")]),Mt(s,"clientWidth",w=>A(o,w)),y(t,s),se()}function us(t,e){oe(e,!0);const i=[{key:"results",label:ue("Explore"),component:Wv}];fa()&&i.unshift({key:"home",label:ue("Home"),component:qu});let a=W(Ue(i[0])),n=W("");const r=V(()=>l(a).component);Ye(()=>{l(n)&&A(a,i.find(s=>s.key==="results"),!0)});function o(s){A(a,s,!0),pe(ve.ExploreNavigate,null,{route:s.key})}$v(t,{get routes(){return i},get currentRoute(){return l(a)},navigate:o,get searchQuery(){return l(n)},set searchQuery(s){A(n,s,!0)},children:(s,c)=>{var d=ye(),u=Q(d);mr(u,()=>l(r),(v,p)=>{p(v,{get searchQuery(){return l(n)}})}),y(s,d)},$$slots:{default:!0}}),se()}const Kr="[data-playpilot-explore]",ep="[data-playpilot-pre-consent-explore]",vs="playpilot-explore-custom-style";let In=null;function jn(){var e;const t=document.querySelector(Kr);t&&(zn(),(e=document.querySelector(ep))==null||e.remove(),t.innerHTML="",In=Lt(us,{target:t}),ip())}function zn(){var t;In&&(Di(In),In=null,(t=document.querySelector("#"+vs))==null||t.remove())}function tp(){var c;const t=window.PlayPilotLinkInjections.config;if(!t)return!1;const{explore_navigation_selector:e,explore_navigation_label:i,explore_navigation_path:a,explore_navigation_insert_position:n}=t;if(!e)return!1;(c=document.querySelector("[data-playpilot-explore-navigation-element]"))==null||c.remove();const r=document.querySelector(e);if(!r)return!1;const o=r.cloneNode(!0),s=o.nodeName==="A"?o:o.querySelector("a");return s.classList.remove("active"),s.innerText=i||"Streaming Guide",s.href=a,o.dataset.playpilotExploreNavigationElement="true",r.insertAdjacentElement(n||"afterend",o),!0}function ip(){var i;const t=(i=window.PlayPilotLinkInjections.config)==null?void 0:i.explore_custom_style;if(!t)return;const e=document.createElement("style");e.textContent=t,e.id=vs,document.body.appendChild(e)}function fa(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.explore_use_router)}function Fa(t,e){oe(e,!0);const i=L(e,"size",3,"32px"),a=L(e,"onclick",3,()=>null),n=Mo(e,["$$slots","$$events","$$legacy","children","size","onclick"]);var r=ye(),o=Q(r);bo(o,()=>e.href?"a":"button",!1,(s,c)=>{Po(s,()=>({role:e.href?"link":"button",onclick:a(),class:"button",...n,[sa]:{"--size":i()}}),void 0,void 0,void 0,"svelte-1ch8qoj");var d=ye(),u=Q(d);He(u,()=>e.children??bt),y(c,d)}),y(t,r),se()}var ap=T("<div></div>");function np(t,e){oe(e,!0);let i=L(e,"threshold",3,100),a=L(e,"isDragging",15,!1),n=L(e,"passedThreshold",15,!1),r=L(e,"onpassed",3,()=>null),o=W(0),s=W(0),c=W(null),d=W(!1);const u=V(()=>Math.max(l(s)-l(o),0));Ye(()=>{n(l(u)>i())});function v(g){if(g){a(!0),A(d,!0),A(o,g.touches[0].pageY,!0);for(const k of e.targets)k.style.transitionDuration="0ms"}}function p(g){if(g&&a()){g.preventDefault(),A(s,g.touches[0].pageY,!0),l(c).style.transform=`translateY(${l(u)}px)`;for(const k of e.targets)k.style.top=`${l(u)}px`}}function f(){if(a()){if(a(!1),n())r()();else{l(c).removeAttribute("style");for(const g of e.targets)g.style.removeProperty("transition"),requestAnimationFrame(()=>g.style.top="0px")}A(o,0),A(s,0)}}var b={start:v,move:p,end:f},h=ap();ge("touchmove",Pe,p,void 0,!0),ge("touchend",Pe,f);let _;return h.__touchstart=v,rt(h,g=>A(c,g),()=>l(c)),H(()=>_=_e(h,1,"handle svelte-1xqgdsn",null,_,{dragging:a(),dragged:l(d)})),y(t,h),se(b)}xe(["touchstart"]);var rp=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],lp=["difference","intersection","symmetricDifference","union"],ps=!1;const Hn=class Hn extends Set{constructor(i){super();be(this,wa);be(this,xa,new Map);be(this,Rt,W(0));be(this,Pi,W(0));be(this,Fn,ci||-1);if(i){for(var a of i)super.add(a);O(this,Pi).v=super.size}ps||Oe(this,wa,Os).call(this)}has(i){var a=super.has(i),n=O(this,xa),r=n.get(i);if(r===void 0){if(!a)return l(O(this,Rt)),!1;r=Oe(this,wa,Ns).call(this,!0),n.set(i,r)}return l(r),a}add(i){return super.has(i)||(super.add(i),A(O(this,Pi),super.size),yi(O(this,Rt))),this}delete(i){var a=super.delete(i),n=O(this,xa),r=n.get(i);return r!==void 0&&(n.delete(i),A(r,!1)),a&&(A(O(this,Pi),super.size),yi(O(this,Rt))),a}clear(){if(super.size!==0){super.clear();var i=O(this,xa);for(var a of i.values())A(a,!1);i.clear(),A(O(this,Pi),0),yi(O(this,Rt))}}keys(){return this.values()}values(){return l(O(this,Rt)),super.values()}entries(){return l(O(this,Rt)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return l(O(this,Pi))}};xa=new WeakMap,Rt=new WeakMap,Pi=new WeakMap,Fn=new WeakMap,wa=new WeakSet,Ns=function(i){return ci===O(this,Fn)?W(i):Ut(i)},Os=function(){ps=!0;var i=Hn.prototype,a=Set.prototype;for(const n of rp)i[n]=function(...r){return l(O(this,Rt)),a[n].apply(this,r)};for(const n of lp)i[n]=function(...r){l(O(this,Rt));var o=a[n].apply(this,r);return new Hn(o)}};let An=Hn;class op{constructor(e,i){be(this,Za);be(this,Ja);he(this,Za,e),he(this,Ja,Ml(i))}get current(){return O(this,Ja).call(this),O(this,Za).call(this)}}Za=new WeakMap,Ja=new WeakMap;const sp=/\(.+\)/,cp=new Set(["all","print","screen","and","or","not","only"]);class dp extends op{constructor(e,i){let a=sp.test(e)||e.split(/[\s,]+/).some(r=>cp.has(r.trim()))?e:`(${e})`;const n=window.matchMedia(a);super(()=>n.matches,r=>ed(n,"change",r))}}const Yr=new dp("(prefers-reduced-motion: reduce)");function Zr(t){function e(){return Array.from(t.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])'))}function i(r){if(r.key!=="Tab")return;const o=document.activeElement;if(!o)return;const s=e();if(!s.length)return;const[c]=s,d=s[s.length-1];r.shiftKey&&o===c&&(d.focus(),r.preventDefault()),!r.shiftKey&&o===d&&(c.focus(),r.preventDefault())}const a=document.activeElement,[n]=e();return a!=null&&a.matches(":focus-visible")&&(n==null||n.focus()),window.addEventListener("keydown",i),{destroy(){window.removeEventListener("keydown",i),a==null||a.focus()}}}function up(){return document.scrollingElement?document.scrollingElement:document.documentElement.scrollTop?document.documentElement:document.body}var vp=T("<div><!></div>"),pp=T('<div class="prepend svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),fp=T('<div class="bubble svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),hp=T('<div class="swipe-handle svelte-1rbidhv"><!></div>'),gp=T("<div><!></div>"),mp=T('<div class="dialog svelte-1rbidhv" role="dialog" aria-labelledby="title" data-view-transition-new="playpilot-title-content"><!> <!> <!></div> <!>',1),yp=T('<div data-testid="modal"><!> <!> <!> <!></div>');function Ha(t,e){oe(e,!0);const i=N=>{var G=vp(),J=x(G);Fa(J,{onclick:C,"aria-label":"Close",children:(Z,ne)=>{Sn(Z,{})},$$slots:{default:!0}}),rt(G,Z=>A(b,Z),()=>l(b)),H(()=>_e(G,1,`close ${o()??""}`,"svelte-1rbidhv")),Ie(7,G,()=>w),y(N,G)},a=L(e,"tall",3,!1),n=L(e,"wide",3,!1),r=L(e,"blur",3,!1),o=L(e,"closeButtonStyle",3,"shadow"),s=L(e,"initialScrollPosition",3,0),c=L(e,"onscroll",3,()=>null),d=L(e,"onclose",3,()=>null),u="#playpilot";let v=W(0),p=W(null),f=W(null),b=W(null),h=W(0),_=W(!1);const g=V(()=>l(v)<Ni);Ye(()=>{var N;l(v)&&A(h,((N=l(f))==null?void 0:N.offsetTop)||0,!0)}),Ye(()=>{setTimeout(()=>{var N;return A(h,((N=l(f))==null?void 0:N.offsetTop)||0,!0)})}),ir("scope","modal"),$e(()=>{const N=up();return N.classList.add("playpilot-modal-open"),A(_,!!xs()),l(_)||window.history.pushState({modal:!0},"",u),requestAnimationFrame(k),()=>{var G;N.classList.remove("playpilot-modal-open"),!xs()&&((G=history.state)!=null&&G.modal)&&history.back()}});function k(){const N=window.innerWidth>Ni?l(p):l(f);N==null||N.scrollTo(0,s())}function w(N){return Yr.current?St(N,{duration:0}):l(g)?ua(N,{duration:250,y:window.innerHeight,opacity:1}):va(N,{duration:150,start:.85})}function C(){d()(),el()}function R(N){N.target===l(p)&&C()}var I=yp();ge("keydown",Pe,({key:N})=>{N==="Escape"&&C()}),ge("hashchange",Pe,C);let z;I.__click=R;let U;var D=x(I);{var P=N=>{var G=pp(),J=x(G);He(J,()=>e.prepend),Ie(7,G,()=>w),y(N,G)};B(D,N=>{e.prepend&&N(P)})}var E=S(D,2);{var j=N=>{var G=fp(),J=x(G);He(J,()=>e.bubble),Ie(7,G,()=>w),y(N,G)};B(E,N=>{e.bubble&&N(j)})}var q=S(E,2);{var F=N=>{var G=hp(),J=x(G);{var Z=ne=>{{let de=V(()=>[l(f),l(b)]);np(ne,{get targets(){return l(de)},onpassed:C})}};B(J,ne=>{l(f)&&l(b)&&ne(Z)})}Ie(7,G,()=>w),y(N,G)};B(q,N=>{l(g)&&N(F)})}var Y=S(q,2);{var K=N=>{var G=ye(),J=Q(G);He(J,()=>e.dialog),y(N,G)},M=N=>{var G=mp(),J=Q(G),Z=x(J);{var ne=le=>{var me=gp(),Le=x(me);Fa(Le,{onclick:()=>kh(),"aria-label":"Back",children:(ae,ee)=>{Zt(ae,{direction:"left"})},$$slots:{default:!0}}),H(()=>_e(me,1,`close back ${o()??""}`,"svelte-1rbidhv")),y(le,me)};B(Z,le=>{l(_)&&le(ne)})}var de=S(Z,2);He(de,()=>e.children??bt);var Se=S(de,2);{var Ee=le=>{i(le)};B(Se,le=>{l(g)||le(Ee)})}rt(J,le=>A(f,le),()=>l(f));var $=S(J,2);{var ie=le=>{i(le)};B($,le=>{l(g)&&le(ie)})}ge("scroll",J,function(...le){var me;(me=c())==null||me.apply(this,le)}),Ie(7,J,()=>w),y(N,G)};B(Y,N=>{e.dialog?N(K):N(M,!1)})}rt(I,N=>A(p,N),()=>l(p)),mt(I,N=>Zr==null?void 0:Zr(N)),H(()=>{z=_e(I,1,"modal svelte-1rbidhv",null,z,{wide:n(),tall:a(),"background-blur":r(),"has-bubble":!!e.bubble,"has-prepend":!!e.prepend}),U=We(I,"",U,{"--dialog-offset":`${l(h)??""}px`})}),Sr("innerWidth",N=>A(v,N,!0)),Ie(5,I,()=>St,()=>({duration:150})),Ie(6,I,()=>St,()=>({duration:150,delay:100})),y(t,I),se()}xe(["click"]);var bp=T('<div class="genre svelte-1mphbln"> </div>'),_p=T('<button class="genre expand svelte-1mphbln"> </button>'),xp=T("<!> <!>",1);function wp(t,e){oe(e,!0);let i=W(!1);const a=V(()=>l(i)?e.genres:[e.genres[0]]);var n=xp(),r=Q(n);je(r,17,()=>l(a),qe,(c,d)=>{const u=V(()=>{var b;return(b=Nr.find(h=>h.slug===l(d)))==null?void 0:b.name});var v=ye(),p=Q(v);{var f=b=>{var h=bp(),_=x(h);vn(h,()=>$o()?ls(Na.GenreInterest,{genre:l(u)}):null),H(g=>X(_,g),[()=>ue(l(u))]),y(b,h)};B(p,b=>{l(u)&&b(f)})}y(c,v)});var o=S(r,2);{var s=c=>{var d=_p();d.__click=()=>A(i,!0);var u=x(d);H(()=>X(u,`+${e.genres.length-1}`)),y(c,d)};B(o,c=>{!l(i)&&e.genres.length>1&&c(s)})}y(t,n),se()}xe(["click"]);var kp=T('<div class="tooltip-content svelte-1ldthr7" role="paragraph"> </div>'),Sp=T('<button class="tooltip svelte-1ldthr7" data-testid="disclaimer"><div aria-label="Disclaimer">i</div> <!></button>');function Jr(t,e){const i=L(e,"small",3,!1);let a=W(!1);function n(u){u.preventDefault(),u.stopPropagation(),A(a,!l(a))}var r=Sp();r.__click=n;var o=x(r);let s;var c=S(o,2);{var d=u=>{var v=kp(),p=x(v);H(()=>X(p,e.disclaimer)),Ie(3,v,()=>St,()=>({duration:50})),y(u,v)};B(c,u=>{l(a)&&u(d)})}H(()=>s=_e(o,1,"disclaimer svelte-1ldthr7",null,s,{small:i()})),y(t,r)}xe(["click"]);var Tp=T('<span class="category svelte-13ka2ap" data-testid="category"> </span>'),Ep=T('<span class="cta svelte-13ka2ap"> </span>'),Pp=T('<div class="playlink-content svelte-13ka2ap"><img alt="" height="36" width="36" class="svelte-13ka2ap"/> <span class="name svelte-13ka2ap"> </span> <!> <!> <div class="action svelte-13ka2ap"> </div> <!></div> <!>',1);function fs(t,e){oe(e,!0);const i=L(e,"disclaimer",3,""),a=L(e,"hideCategory",3,!1),n=L(e,"onclick",3,()=>null),r=V(()=>e.playlink.name),o=V(()=>e.playlink.url),s=V(()=>e.playlink.logo_url),c=V(()=>e.playlink.highlighted),d=V(()=>e.playlink.cta_text),u=V(()=>e.playlink.action_text),v=V(()=>e.playlink.pixels),p=V(()=>e.playlink.extra_info.category),f=V(()=>$o()&&!l(c)),b={AVOD:ue("Stream"),SVOD:ue("Stream"),BUY:ue("Buy"),RENT:ue("Rent"),TVOD:ue("Rent Or Buy")};let h=W(0);var _=ye(),g=Q(_);bo(g,()=>{var k,w;return!((w=(k=window.PlayPilotLinkInjections)==null?void 0:k.config)!=null&&w.require_affiliate_consent)||qt("affiliate")?"a":"span"},!1,(k,w)=>{vn(k,()=>l(f)?ls(Na.ProviderInterest,{provider:e.playlink.slug}):null),vn(k,()=>l(f)?Ru(Na.ProviderClick,{provider:e.playlink.slug}):null),Po(k,()=>({onclick:n(),href:l(o),target:"_blank",class:"playlink","data-playlink":l(r),rel:"sponsored",[oa]:{highlighted:l(c),"no-category":a(),"no-subtext":!l(d)&&a()}}),void 0,void 0,void 0,"svelte-13ka2ap");var C=Pp(),R=Q(C);let I;var z=x(R),U=S(z,2),D=x(U),P=S(U,2);{var E=J=>{var Z=Tp(),ne=x(Z);H(de=>X(ne,de),[()=>b[l(p)]||ue("Stream")]),y(J,Z)};B(P,J=>{a()||J(E)})}var j=S(P,2);{var q=J=>{var Z=Ep(),ne=x(Z);H(()=>X(ne,l(d))),y(J,Z)};B(j,J=>{l(d)&&J(q)})}var F=S(j,2),Y=x(F),K=S(F,2);{var M=J=>{Jr(J,{get disclaimer(){return i()},small:!0})};B(K,J=>{i()&&J(M)})}var N=S(R,2);{var G=J=>{Gr(J,{get pixels(){return l(v)}})};B(N,J=>{var Z;(Z=l(v))!=null&&Z.length&&J(G)})}H((J,Z)=>{I=We(R,"",I,{"--action-width":l(h)?`${l(h)}px`:null}),re(z,"src",J),X(D,l(r)),X(Y,Z)},[()=>pa(l(s)),()=>l(u)||ue("Watch")]),Mt(F,"clientWidth",J=>A(h,J)),y(w,C)}),y(t,_),se()}var Cp=T('<div class="disclaimer svelte-1fykz2q" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1fykz2q">PlayPilot.com</a></div>'),Ip=T('<div class="empty svelte-1fykz2q" data-testid="playlinks-empty"> </div>'),jp=T('<div class="heading category svelte-1fykz2q"> </div>'),zp=T("<!> <!>",1),Ap=T("<!> <div></div>",1),Lp=T('<div class="heading svelte-1fykz2q"> </div> <!> <!>',1);function Mp(t,e){var C,R;oe(e,!0);const i=tr("scope")==="modal",a=Oa("card"),n=!!((R=(C=window.PlayPilotLinkInjections)==null?void 0:C.config)!=null&&R.categorize_playlinks);let r=W(0);const o=V(()=>os(e.playlinks)),s=V(()=>v(e.playlinks)),c=V(()=>n?p(l(s)):[["",l(o)]]),d=V(()=>l(r)<500||!!a||l(o).length===1);function u(I){pe(i?ve.TitleModalPlaylinkClick:ve.TitlePopoverPlaylinkClick,e.title,{playlink:I})}function v(I){const z={};for(const U of I){const{category:D}=U.extra_info;D in z||(z[D]=[]),z[D].push(U)}return z}function p(I){const z=["AVOD","SVOD","RENT","BUY"],U=[];for(const P of z)I[P]&&U.push([P,I[P]]);const D=[];for(const P of Object.values(I))for(const E of P)z.includes(E.extra_info.category)||D.push(E);return[...U,["Other",D]]}var f=Lp(),b=Q(f),h=x(b);mt(b,(I,z)=>ze==null?void 0:ze(I,z),()=>3);var _=S(b,2);{var g=I=>{var z=Cp(),U=x(z);H(D=>X(U,`${D??""} `),[()=>{var D,P;return((P=(D=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:D.config)==null?void 0:P.playlinks_disclaimer_text)||ue("Commission Disclaimer")}]),y(I,z)},k=I=>{var z=Ip(),U=x(z);H(D=>X(U,D),[()=>ue("Title Unavailable")]),y(I,z)};B(_,I=>{l(o).length?I(g):I(k,!1)})}var w=S(_,2);je(w,17,()=>l(c),qe,(I,z,U,D)=>{var P=V(()=>ka(l(z),2));let E=()=>l(P)[0],j=()=>l(P)[1];var q=Ap(),F=Q(q);{var Y=N=>{var G=jp(),J=x(G);mt(G,(Z,ne)=>ze==null?void 0:ze(Z,ne),()=>4),H(Z=>X(J,Z),[()=>ue(`Category: ${E()}`)]),y(N,G)};B(F,N=>{E()&&j().length&&N(Y)})}var K=S(F,2);let M;je(K,21,j,qe,(N,G,J)=>{var Z=zp(),ne=Q(Z);fs(ne,{get playlink(){return l(G)},onclick:()=>u(l(G).name)});var de=S(ne,2);{var Se=Ee=>{{let $=V(()=>tu(a)),ie=V(()=>a.disclaimer||"");fs(Ee,{get playlink(){return l($)},onclick:()=>pe(ve.DisplayedAdPlaylickClick,e.title,{campaign_name:a.campaign_name}),hideCategory:!0,get disclaimer(){return l(ie)}})}};B(de,Ee=>{a&&J===0&&Ee(Se)})}y(N,Z)}),H(()=>{M=_e(K,1,"playlinks svelte-1fykz2q",null,M,{list:l(d)}),re(K,"data-testid",`category-${E()??""}`)}),Mt(K,"clientWidth",N=>A(r,N)),y(I,q)}),H(I=>X(h,I),[()=>ue("Where To Stream Online")]),y(t,f),se()}var qp=T('<button class="show-more svelte-7itcht">Show more</button>'),Dp=T('<div class="paragraph svelte-7itcht" role="paragraph"> </div>'),Rp=T('<div class="description svelte-7itcht"><span class="paragraph svelte-7itcht" role="paragraph"> <!> <!></span> <!></div>');function Np(t,e){oe(e,!0);const i=L(e,"blurb",3,""),a=L(e,"limit",3,200),n=L(e,"onclick",3,()=>null);let r=W(!1);const o=V(()=>e.text.slice(0,a()));function s(){A(r,!0),n()()}var c=Rp(),d=x(c),u=x(d),v=S(u);{var p=g=>{var k=Qe("...");y(g,k)};B(v,g=>{!l(r)&&e.text.length>a()&&g(p)})}var f=S(v,2);{var b=g=>{var k=qp();k.__click=()=>s(),y(g,k)};B(f,g=>{!l(r)&&(e.text.length>a()||i())&&g(b)})}var h=S(d,2);{var _=g=>{var k=Dp(),w=x(k);H(()=>X(w,i())),y(g,k)};B(h,g=>{l(r)&&g(_)})}H(()=>X(u,l(r)?e.text:l(o))),y(t,c),se()}xe(["click"]);async function Op(t,{page:e=1}={}){const i={language:Ra(),region:await Br(),include_count:"false",participant_sid:t.sid,page:e};return(await Yt(`/titles/browse?api-token=${ui()}&${qr(i)}`)).results}async function Bp(t){return(await Yt(`/participants/browse?api-token=${ui()}&title_sid=${t.sid}`)).results}var Fp=T('<div class="character truncate svelte-zy7e3f"> </div>'),Hp=T('<button class="participant svelte-zy7e3f" data-testid="participant"><span class="truncate svelte-zy7e3f"> </span> <!></button>'),Vp=T('<div class="participant svelte-zy7e3f"></div>');function Up(t,e){oe(e,!0);function i(o){const s=kt(Ar(zr(da()))),c={};for(const u of o){const v=_n(s,kt(u.name));c[u.sid]={participant:u,count:v}}return Object.values(c).sort((u,v)=>v.count-u.count).map(({participant:u})=>u)}function a(o,s){xi({event:o,type:"participant",data:s}),pe(ve.ParticipantClick,null,{title_source:e.title.original_title||e.title.title,participant:s.name})}var n=ye(),r=Q(n);un(r,()=>Bp(e.title),o=>{{let s=V(()=>ue("Cast"));En(o,{get heading(){return l(s)},children:(c,d)=>{var u=ye(),v=Q(u);je(v,16,()=>({length:5}),qe,(p,f)=>{var b=Vp();y(p,b)}),y(c,u)},$$slots:{default:!0}})}},(o,s)=>{var c=ye(),d=Q(c);{var u=v=>{{let p=V(()=>ue("Cast"));En(v,{get heading(){return l(p)},children:(f,b)=>{var h=ye(),_=Q(h);je(_,17,()=>i(l(s)).slice(0,15),qe,(g,k)=>{var w=Hp();w.__click=U=>a(U,l(k));var C=x(w),R=x(C),I=S(C,2);{var z=U=>{var D=Fp(),P=x(D);H(()=>X(P,l(k).character)),y(U,D)};B(I,U=>{l(k).character&&U(z)})}H(()=>X(R,l(k).name)),y(g,w)}),y(f,h)},$$slots:{default:!0}})}};B(d,v=>{var p;(p=l(s))!=null&&p.length&&v(u)})}y(o,c)}),y(t,n),se()}xe(["click"]);function Wp(t,e){oe(e,!0);const i=nu(e.title);{let a=V(()=>ue("Similar Titles"));rs(t,{get titles(){return i},get heading(){return l(a)},onclick:n=>pe(ve.SimilarTitleClick,n,{title_source:e.title.original_title||e.title.title})})}se()}function Gp(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}var Kp=Fe('<svg width="16" height="15" viewBox="0 0 16 15"><path fill="currentColor" d="M6.70138 1.36838C6.70187 0.320494 7.75924 -0.233702 8.60177 0.0939687L8.76779 0.172094L8.82345 0.203344L8.87521 0.240453L14.4748 4.35666C15.273 4.89508 15.2742 6.06459 14.4807 6.60666L8.8879 10.8586L8.83029 10.9026L8.76779 10.9367C7.90544 11.4141 6.70148 10.8588 6.70138 9.74045V9.051C6.21939 9.09485 5.65912 9.18628 5.11056 9.37034C4.41863 9.60256 3.79163 9.96387 3.33907 10.5061C2.89934 11.0331 2.56088 11.8063 2.56075 12.9924C2.56075 13.1083 2.55351 13.2694 2.50802 13.4348C2.48558 13.5162 2.34386 14.0279 1.78439 14.1965C1.18154 14.3778 0.775385 13.9725 0.706262 13.9006C0.580913 13.7702 0.500537 13.626 0.452356 13.5305C0.257874 13.1448 0.107806 12.5395 0.0402463 11.841C-0.0994489 10.3951 0.0801391 8.23145 1.2922 5.90647C2.38232 3.81585 4.09969 2.85246 5.51095 2.42209C5.94157 2.29082 6.34701 2.20931 6.70138 2.15745V1.36838ZM8.28341 1.04709C8.02513 0.904267 7.70193 1.08266 7.70138 1.36838V3.07346C6.71677 3.09168 3.72663 3.40026 2.17892 6.36838L1.98165 6.76584C0.053228 10.8548 1.56075 14.193 1.56075 12.9924C1.56118 8.17098 6.39327 7.98172 7.70138 8.01877V9.74045C7.70147 9.9908 7.94881 10.1585 8.1838 10.1008L8.28341 10.0627L13.883 5.80686C14.1412 5.66368 14.1413 5.30543 13.883 5.16233L8.28341 1.04709Z"></path></svg>');function Yp(t){var e=Kp();y(t,e)}var Zp=Fe('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"></path></svg>');function Jp(t){var e=Zp();y(t,e)}var Xp=Fe('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"></path></svg>');function Qp(t){var e=Xp();y(t,e)}var $p=Fe('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ef(t){var e=$p();y(t,e)}var tf=T('<button class="svelte-827qd7"><!></button>'),af=T('<div class="content svelte-827qd7"><!></div>'),nf=T("<div><!> <!></div>");function hs(t,e){const i=L(e,"label",3,""),a=L(e,"align",3,"right");let n=W(!1),r=W(null);function o(f){var h;f.currentTarget===((h=l(r))==null?void 0:h.querySelector("button"))&&f.stopPropagation(),A(n,!l(n))}var s=nf();ge("click",Pe,()=>A(n,!1));var c=x(s);{var d=f=>{var b=ye(),h=Q(b);He(h,()=>e.button,()=>({toggle:o})),y(f,b)},u=f=>{var b=tf();b.__click=o;var h=x(b);ef(h),H(()=>{re(b,"aria-label",i()),re(b,"aria-expanded",l(n))}),y(f,b)};B(c,f=>{e.button?f(d):f(u,!1)})}var v=S(c,2);{var p=f=>{var b=af(),h=x(b);He(h,()=>e.children),Ie(1,b,()=>va,()=>({duration:50,start:.85})),y(f,b)};B(v,f=>{l(n)&&f(p)})}rt(s,f=>A(r,f),()=>l(r)),H(()=>_e(s,1,`context-menu ${a()??""}`,"svelte-827qd7")),y(t,s)}xe(["click"]);var rf=T("<!> ",1),lf=T('<button class="item svelte-npfy12"><!> </button> <button class="item svelte-npfy12"><!> </button>',1);function of(t,e){oe(e,!0);let i=L(e,"url",7);const n=window.innerWidth<Ni&&typeof navigator.share<"u";$e(()=>{i(i()+"?utm_source=tpi")});function r(c,d){if(!n){d(c);return}pe(ve.ShareTitle,null,{title:e.title,url:Oi(),method:"native"}),navigator.share({title:e.title,url:i()})}function o(){pe(ve.ShareTitle,null,{title:e.title,url:Oi(),method:"copy"}),Gp(i())}function s(){pe(ve.ShareTitle,null,{title:e.title,url:Oi(),method:"email"}),window.location.href=`mailto:?body=${i()}`}hs(t,{button:(d,u)=>{let v=()=>u==null?void 0:u().toggle;Fi(d,{onclick:p=>r(p,v()),children:(p,f)=>{var b=rf(),h=Q(b);Yp(h);var _=S(h);H(g=>X(_,` ${g??""}`),[()=>ue("Share")]),y(p,b)},$$slots:{default:!0}})},children:(d,u)=>{var v=lf(),p=Q(v);p.__click=o;var f=x(p);Jp(f);var b=S(f),h=S(p,2);h.__click=s;var _=x(h);Qp(_);var g=S(_);H((k,w)=>{X(b,` ${k??""}`),X(g,` ${w??""}`)},[()=>ue("Copy URL"),()=>ue("Email")]),y(d,v)},$$slots:{button:!0,default:!0}}),se()}xe(["click"]);var sf=Fe('<svg width="12" height="12" viewBox="0 0 12 12"><path stroke="currentColor" stroke-width="1.1" transform="translate(2 0)" d="M9.47461 5.37598C9.77461 5.54918 9.77461 5.98207 9.47461 6.15527L1.22461 10.9189C0.924693 11.0916 0.549804 10.8745 0.549804 10.5283L0.549805 1.00293C0.549805 0.656711 0.924691 0.439623 1.22461 0.612304L9.47461 5.37598Z"></path></svg>');function cf(t){var e=sf();y(t,e)}var df=T("<!> ",1);function uf(t,e){oe(e,!0);function i(){vu(e.title),pe(ve.TrailerClick,e.title)}Fi(t,{onclick:i,children:(a,n)=>{var r=df(),o=Q(r);cf(o);var s=S(o);H(c=>X(s,` ${c??""}`),[()=>ue("Watch Trailer")]),y(a,r)},$$slots:{default:!0}}),se()}var vf=T('<div class="video-background svelte-18bbkrh" data-testid="video-background"><!></div>');function pf(t,e){const i=L(e,"embeddable_url",3,"");let a=W(0),n=W(0);const r=V(()=>Math.max(l(a),l(n)));var o=vf(),s=x(o);Ur(s,{get embeddable_url(){return i()},muted:!0,loop:!0}),H(()=>We(o,`--height: ${l(r)??""}px; --width: ${l(a)??""}px;`)),Mt(o,"clientWidth",c=>A(a,c)),Mt(o,"clientHeight",c=>A(n,c)),y(t,o)}var ff=T("<div> </div>"),hf=T('<img alt=""/>'),gf=T('<div><div class="header svelte-16ajinh"><div><!></div> <div id="title"> </div> <div class="info svelte-16ajinh"><div class="imdb svelte-16ajinh"><!> </div> <!> <div> </div> <div class="capitalize svelte-16ajinh"> </div> <!></div> <div class="actions svelte-16ajinh"><!> <!></div></div> <div class="main"><!> <!> <!> <!></div></div> <div><!></div>',1);function Xr(t,e){var ae;oe(e,!0);const i=L(e,"small",3,!1),a=L(e,"useVideoBackground",3,!0),n=!!((ae=window.PlayPilotLinkInjections)!=null&&ae.no_affiliate);ir("title",e.title);const r=V(()=>(!i()||n)&&e.title.description);let o=W(!1),s=W(!1),c=W(!1),d=W(!1);Ye(()=>{a()&&e.title.embeddable_url&&as(Vr(e.title.embeddable_url)).then(ee=>{A(d,ee,!0)})});var u=gf(),v=Q(u);let p;var f=x(v),b=x(f);let h;var _=x(b);kn(_,{get title(){return e.title},onload:()=>A(o,!0),lazy:!1});var g=S(b,2);let k;var w=x(g);mt(g,(ee,fe)=>ze==null?void 0:ze(ee,fe),()=>2);var C=S(g,2),R=x(C),I=x(R);Cn(I,{});var z=S(I),U=S(R,2);wp(U,{get genres(){return e.title.genres}});var D=S(U,2),P=x(D),E=S(D,2),j=x(E),q=S(E,2);{var F=ee=>{var fe=ff(),Ae=x(fe);H(De=>X(Ae,`${e.title.length??""} ${De??""}`),[()=>ue("Minutes")]),y(ee,fe)};B(q,ee=>{!i()&&e.title.length&&ee(F)})}var Y=S(C,2),K=x(Y);{var M=ee=>{uf(ee,{get title(){return e.title}})};B(K,ee=>{e.title.embeddable_url&&ee(M)})}var N=S(K,2);{let ee=V(()=>Wr(e.title));of(N,{get title(){return e.title.title},get url(){return l(ee)}})}var G=S(f,2),J=x(G);{var Z=ee=>{Np(ee,{get text(){return e.title.description},get blurb(){return e.title.blurb},onclick:()=>pe(ve.ExpandTitleDescription,e.title)})};B(J,ee=>{l(r)&&ee(Z)})}var ne=S(J,2);{var de=ee=>{Mp(ee,{get playlinks(){return e.title.providers},get title(){return e.title}})};B(ne,ee=>{n||ee(de)})}var Se=S(ne,2);Up(Se,{get title(){return e.title}});var Ee=S(Se,2);Wp(Ee,{get title(){return e.title}});var $=S(v,2);let ie;var le=x($);{var me=ee=>{pf(ee,{get embeddable_url(){return e.title.embeddable_url}})},Le=ee=>{var fe=ye(),Ae=Q(fe);Ri(Ae,()=>l(c),De=>{var Ke=hf();let te;H(ce=>{re(Ke,"src",ce),te=_e(Ke,1,"svelte-16ajinh",null,te,{loaded:l(s),blur:l(c)})},[()=>pa(l(c)?e.title.standing_poster:e.title.medium_poster)]),ge("load",Ke,()=>A(s,!0)),ge("error",Ke,()=>A(c,!0)),y(De,Ke)}),y(ee,fe)};B(le,ee=>{a()&&l(d)?ee(me):ee(Le,!1)})}H(ee=>{p=_e(v,1,"content svelte-16ajinh",null,p,{small:i()}),h=_e(b,1,"poster svelte-16ajinh",null,h,{loaded:l(o)}),k=_e(g,1,"heading svelte-16ajinh",null,k,{truncate:i()}),X(w,e.title.title),X(z,` ${e.title.imdb_score??""}`),X(P,e.title.year),X(j,ee),ie=_e($,1,"background svelte-16ajinh",null,ie,{small:i()})},[()=>ue(`Type: ${e.title.type}`)]),y(t,u),se()}function ha(t,e){const{onclick:i}=e;function a(n){return n.button!==1?null:(i(n),n)}return t.addEventListener("mouseup",a),{destroy(){t.removeEventListener("mouseup",a)}}}const gs={TopScrollBackground:"topscrollBackgroundMobile",TopScrollContent:"8by1x23"},Qr={TopScrollFormat:{key:"top_scroll_format",numberOfVariants:2,variantNames:["Separated","Inline"]}};function mf({key:t}){var a,n,r;if(!qt("tracking"))return 0;const e=(n=(a=window.PlayPilotLinkInjections)==null?void 0:a.split_test_identifiers)==null?void 0:n[t];if(e!==void 0)return e;(r=window.PlayPilotLinkInjections)!=null&&r.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});const i=Math.random();return window.PlayPilotLinkInjections.split_test_identifiers[t]=i,i}function ms(t){const e=mf(t);return Math.floor(e*t.numberOfVariants)}function yf(t){var i;const e=ms(t);return((i=t.variantNames)==null?void 0:i[e])||e.toString()}function bf(t,e=1){return qt("tracking")?ms(t)===e:!1}function _f(t){const e=yf(t);pe(ve.SplitTestView,null,{key:t.key,variant:e})}var xf=T('<img class="content-image svelte-1mt6g1y" width="728" height="90"/>'),wf=T('<img class="logo svelte-1mt6g1y" alt="" width="50" height="50"/>'),kf=T('<button class="button svelte-1mt6g1y"> </button>'),Sf=T('<!> <p class="tagline svelte-1mt6g1y"> </p> <!>',1),Tf=T('<div class="background svelte-1mt6g1y"></div>'),Ef=T("<!> <!>",1),Pf=T('<a target="_blank" tabindex="-1" rel="sponsored"><div class="content svelte-1mt6g1y"><!></div> <!></a>');function ys(t,e){oe(e,!0),pe(ve.TopScrollView,null,{campaign_name:e.campaign.campaign_name}),_f(Qr.TopScrollFormat);const i=V(()=>e.campaign.disclaimer),a=V(()=>e.campaign.content),n=V(()=>e.campaign.cta),r=V(()=>l(a).format),o=V(()=>l(a).header),s=V(()=>l(a).header_logo),c=V(()=>l(a).image_uuid),d=V(()=>l(n).header),u=V(()=>l(n).url),v=V(()=>l(r)==="large"),p=V(()=>is(l(c),gs.TopScrollBackground)),f=V(()=>is(l(c),gs.TopScrollContent));let b=W(0);function h(){pe(ve.TopScrollClick,null,{campaign_name:e.campaign.campaign_name})}var _=Pf();_.__click=h;let g,k;var w=x(_),C=x(w);{var R=D=>{var P=xf();H(()=>{re(P,"src",l(f)),re(P,"alt",l(o))}),y(D,P)},I=D=>{var P=Sf(),E=Q(P);{var j=M=>{var N=wf();H(()=>re(N,"src",l(s))),y(M,N)};B(E,M=>{l(s)&&M(j)})}var q=S(E,2),F=x(q),Y=S(q,2);{var K=M=>{var N=kf(),G=x(N);H(()=>X(G,l(d))),y(M,N)};B(Y,M=>{l(d)&&M(K)})}H(()=>X(F,l(o))),y(D,P)};B(C,D=>{l(v)?D(R):D(I,!1)})}var z=S(w,2);{var U=D=>{var P=Ef(),E=Q(P);{var j=Y=>{var K=Tf();let M;H(()=>M=We(K,"",M,{"--background":`url('${l(p)??""}')`})),y(Y,K)};B(E,Y=>{l(c)&&Y(j)})}var q=S(E,2);{var F=Y=>{Jr(Y,{get disclaimer(){return l(i)}})};B(q,Y=>{l(i)&&Y(F)})}y(D,P)};B(z,D=>{l(v)||D(U)})}mt(_,(D,P)=>ha==null?void 0:ha(D,P),()=>({onclick:h})),bi(()=>Mt(_,"clientWidth",D=>A(b,D))),H(()=>{re(_,"href",l(u)),g=_e(_,1,"top-scroll svelte-1mt6g1y",null,g,{simple:l(v)}),k=We(_,"",k,{"--width":`${l(b)??""}px`})}),y(t,_),se()}xe(["click"]);var Cf=T('<div class="content svelte-r7ubzi"><!></div>'),If=T('<div class="tooltip svelte-r7ubzi" data-testid="tooltip"><!> <!></div>');function jf(t,e){let i=W(!1);var a=If();a.__touchstart=()=>A(i,!l(i));var n=x(a);He(n,()=>e.children);var r=S(n,2);{var o=s=>{var c=Cf(),d=x(c);He(d,()=>e.content),Ie(1,c,()=>St,()=>({duration:100})),y(s,c)};B(r,s=>{l(i)&&s(o)})}ge("mouseenter",a,()=>A(i,!0)),ge("mouseleave",a,()=>A(i,!1)),y(t,a)}xe(["touchstart"]);var zf=T('<div class="info svelte-qcpiki"><!></div>'),Af=T('<img class="logo svelte-qcpiki" alt="" height="40" width="40"/>'),Lf=T('<span class="name svelte-qcpiki"> </span>'),Mf=T('<div class="subheader svelte-qcpiki"> </div>'),qf=T('<div class="action svelte-qcpiki"> </div>'),Df=T('<div class="cta svelte-qcpiki"><!> <div><!> <!></div> <!></div>'),Rf=T('<img class="background svelte-qcpiki" alt=""/>'),Nf=T('<video class="background svelte-qcpiki" autoplay playsinline="" loop><source type="video/mp4"/> <track kind="captions"/></video>',2),Of=T('<div class="disclaimer svelte-qcpiki"><!></div>'),Bf=T('<a target="_blank" rel="sponsored"><!> <!> <!> <!></a>');function bs(t,e){oe(e,!0);const i=L(e,"compact",3,!1),a=V(()=>e.campaign.disclaimer),n=V(()=>e.campaign.content),r=V(()=>e.campaign.cta),o=V(()=>e.campaign.campaign_type),s=V(()=>l(n).header),c=V(()=>l(n).subheader),d=V(()=>l(n).header_logo),u=V(()=>l(n).image),v=V(()=>l(n).video),p=V(()=>l(r).header),f=V(()=>l(r).url),b=V(()=>l(r).subheader);let h=W(0);pe(ve.DisplayAdView,null,{campaign_name:e.campaign.campaign_name});function _(){pe(ve.DisplayAdClick,null,{campaign_name:e.campaign.campaign_name})}var g=Bf();let k;g.__click=_;var w=x(g);{var C=j=>{var q=zf(),F=x(q);{var Y=M=>{jf(M,{content:G=>{var J=Qe();H(()=>X(J,l(b))),y(G,J)},children:(G,J)=>{var Z=Qe("Ad");y(G,Z)},$$slots:{content:!0,default:!0}})},K=M=>{var N=Qe();H(()=>X(N,l(b))),y(M,N)};B(F,M=>{i()?M(Y):M(K,!1)})}y(j,q)};B(w,j=>{l(b)&&j(C)})}var R=S(w,2);{var I=j=>{var q=Df(),F=x(q);{var Y=de=>{var Se=Af();H(()=>re(Se,"src",l(d))),y(de,Se)};B(F,de=>{l(d)&&de(Y)})}var K=S(F,2),M=x(K);{var N=de=>{var Se=Lf(),Ee=x(Se);H(()=>X(Ee,l(s))),y(de,Se)};B(M,de=>{l(s)&&de(N)})}var G=S(M,2);{var J=de=>{var Se=Mf(),Ee=x(Se);H(()=>X(Ee,l(c))),y(de,Se)};B(G,de=>{l(c)&&de(J)})}var Z=S(K,2);{var ne=de=>{var Se=qf(),Ee=x(Se);H(()=>X(Ee,l(p))),y(de,Se)};B(Z,de=>{l(p)&&de(ne)})}Mt(q,"clientHeight",de=>A(h,de)),y(j,q)};B(R,j=>{(l(d)||l(s)||l(c)||l(p))&&j(I)})}var z=S(R,2);{var U=j=>{var q=Rf();H(()=>re(q,"src",l(u))),y(j,q)},D=j=>{var q=ye(),F=Q(q);{var Y=K=>{var M=Nf();M.muted=!0;var N=x(M);H(()=>re(N,"src",l(v))),y(K,M)};B(F,K=>{l(o)==="video"&&l(v)&&K(Y)},!0)}y(j,q)};B(z,j=>{l(o)==="image"&&l(u)?j(U):j(D,!1)})}var P=S(z,2);{var E=j=>{var q=Of();let F;var Y=x(q);Jr(Y,{get disclaimer(){return l(a)}}),H(()=>F=We(q,"",F,{"--offset":`${l(h)??""}px`})),y(j,q)};B(P,j=>{l(a)&&j(E)})}mt(g,(j,q)=>ha==null?void 0:ha(j,q),()=>({onclick:_})),H(()=>{re(g,"href",l(f)),k=_e(g,1,"display svelte-qcpiki",null,k,{compact:i()})}),y(t,g),se()}xe(["click"]);var Ff=T('<a class="call-to-action svelte-1677ll3"><img alt="" width="70" height="57"/> <div><strong class="svelte-1677ll3">Looking for something else?</strong> <div>Use our streamingguide</div></div> <div class="arrow svelte-1677ll3"><!></div></a>');function Hf(t,e){var c,d;oe(e,!1);const i="https://cdn.jsdelivr.net/npm/@playpilot/tpi@latest/src/lib/images/titles-list.webp",a=(d=(c=window.PlayPilotLinkInjections)==null?void 0:c.config)==null?void 0:d.explore_navigation_path;Tr();var n=Ff();n.__click=()=>pe(ve.CardToExploreCta);var r=x(n);re(r,"src",i);var o=S(r,4),s=x(o);Zt(s,{}),H(()=>re(n,"href",a)),y(t,n),se()}xe(["click"]);function Vf(t,e){var p,f;oe(e,!0);const i=b=>{var h=ye(),_=Q(h);{var g=w=>{ys(w,{get campaign(){return o}})},k=w=>{Hf(w,{})};B(_,w=>{o?w(g):w(k,!1)})}y(b,h)},a=b=>{var h=ye(),_=Q(h);{var g=k=>{bs(k,{get campaign(){return s}})};B(_,k=>{s&&k(g)})}y(b,h)},n=L(e,"initialScrollPosition",3,0),r=Mo(e,["$$slots","$$events","$$legacy","title","initialScrollPosition"]),o=Oa("top_scroll"),s=Oa("card"),c=(f=(p=window.PlayPilotLinkInjections)==null?void 0:p.config)==null?void 0:f.explore_insert_cta_in_tpi,d=!!o||c&&!document.querySelector(Kr);let u=!1;pe(ve.TitleModalView,e.title),$e(()=>{const b=Date.now();return()=>pe(ve.TitleModalClose,e.title,{time_spent:Date.now()-b})});function v(){u||(pe(ve.TitleModalScroll,e.title),u=!0)}{let b=V(()=>d?i:null),h=V(()=>s?a:null);Ha(t,{onscroll:v,get initialScrollPosition(){return n()},get bubble(){return l(b)},get prepend(){return l(h)},tall:!0,children:(_,g)=>{Xr(_,mn({get title(){return e.title}},()=>r))},$$slots:{default:!0}})}se()}var Uf=T(" <strong> </strong>",1),Wf=T('<p class="dates svelte-ke01cs"> <strong> </strong><!></p>'),Gf=T('<div class="skeleton svelte-ke01cs" data-testid="skeleton"></div>'),Kf=T('<button class="more svelte-ke01cs"> </button>'),Yf=T('<div class="header svelte-ke01cs"><div class="heading svelte-ke01cs" id="name"> </div> <!></div> <div class="content svelte-ke01cs"><div class="heading small svelte-ke01cs" id="credits"> </div> <div class="list svelte-ke01cs"><!> <!></div></div>',1);function Zf(t,e){oe(e,!0);const i=V(()=>e.participant.name),a=V(()=>e.participant.birth_date),n=V(()=>e.participant.death_date),r=30;let o=W(Ue([])),s=W(1),c=W(!0),d=W(!0);$e(v),qt("pixels")&&Pn(Na.ParticipantView,{participant:e.participant.name});function u(P){return new Date(P).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})}async function v(){A(d,!0);try{const P=await Op(e.participant,{page:l(s)});A(o,[...l(o),...P],!0),A(c,(P==null?void 0:P.length)>=r)}catch{A(c,!1)}finally{A(d,!1),A(s,l(s)+1)}}var p=Yf(),f=Q(p),b=x(f),h=x(b);mt(b,(P,E)=>ze==null?void 0:ze(P,E),()=>2);var _=S(b,2);{var g=P=>{var E=Wf(),j=x(E),q=S(j),F=x(q),Y=S(q);{var K=M=>{var N=Uf(),G=Q(N),J=S(G),Z=x(J);H((ne,de)=>{X(G,`, ${ne??""} `),X(Z,de)},[()=>ue("Died On"),()=>u(l(n))]),y(M,N)};B(Y,M=>{l(n)&&M(K)})}H((M,N)=>{X(j,`${M??""} `),X(F,N)},[()=>ue("Born On"),()=>u(l(a))]),y(P,E)};B(_,P=>{l(a)&&P(g)})}var k=S(f,2),w=x(k),C=x(w);mt(w,(P,E)=>ze==null?void 0:ze(P,E),()=>3);var R=S(w,2),I=x(R);je(I,17,()=>l(o),qe,(P,E)=>{cs(P,{get title(){return l(E)},onclick:j=>xi({event:j,data:l(E)})})});var z=S(I,2);{var U=P=>{var E=ye(),j=Q(E);je(j,16,()=>({length:6}),qe,(q,F)=>{var Y=Gf();y(q,Y)}),y(P,E)},D=P=>{var E=ye(),j=Q(E);{var q=F=>{var Y=Kf();Y.__click=v;var K=x(Y);H(M=>X(K,M),[()=>ue("Show More")]),y(F,Y)};B(j,F=>{l(c)&&F(q)},!0)}y(P,E)};B(z,P=>{l(d)?P(U):P(D,!1)})}H(P=>{X(h,l(i)),X(C,P)},[()=>ue("Credits")]),y(t,p),se()}xe(["click"]);function Jf(t,e){oe(e,!0);const i=L(e,"initialScrollPosition",3,0);let a=W(0);pe(ve.ParticipantModalView,null,{participant:e.participant.name}),$e(()=>{const n=Date.now();return()=>pe(ve.ParticipantModalClose,null,{participant:e.participant.name,time_spent:Date.now()-n})}),Ha(t,{get initialScrollPosition(){return i()},closeButtonStyle:"flat",tall:!0,children:(n,r)=>{Zf(n,{get participant(){return e.participant}})},$$slots:{default:!0}}),Sr("innerWidth",n=>A(a,n,!0)),se()}var Xf=T('<div class="content svelte-16hba4m"><!></div>');function Qf(t,e){const i=L(e,"initialScrollPosition",3,0);Ha(t,{get initialScrollPosition(){return i()},closeButtonStyle:"flat",wide:!0,children:(a,n)=>{var r=Xf(),o=x(r);us(o,{}),y(a,r)},$$slots:{default:!0}})}function $f(t,e=!0){if(!document.startViewTransition||!e){t();return}document.startViewTransition(()=>{const i=document.querySelectorAll("[data-view-transition-old]");if(t(),!i.length)return;document.querySelectorAll("[data-view-transition-new]").forEach(n=>{n.style.viewTransitionName=n.dataset.viewTransitionNew||""})})}var eh=Fe('<svg viewBox="0 -960 960 960" width="24px" height="24px" fill="currentColor"><path d="m480-320 160-160-56-56-64 64v-168h-80v168l-64-64-56 56 160 160Zm0 240q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"></path></svg>');function th(t){var e=eh();y(t,e)}var ih=T('<div class="scroll-indicator svelte-wxwoko"><div class="scroll-indicator-icon svelte-wxwoko"><!></div></div>'),ah=T('<div class="bubble svelte-wxwoko" data-view-transition-old=""><!></div>'),nh=T('<div class="append svelte-wxwoko" data-view-transition-old=""><!></div>'),rh=T('<div tabindex="-1" aria-hidden="true"><div class="dialog svelte-wxwoko" data-view-transition-old=""><!> <!></div> <!> <!></div>');function lh(t,e){oe(e,!0),ir("scope","popover");const i=e.bubble&&bf(Qr.TopScrollFormat,1),a=V(()=>({duration:Yr.current?0:100,y:10}));let n=W(null),r=W(!1),o=W(!0),s=W(!1),c=W(0),d=W(0),u=W(0);$e(async()=>{await Ma(),v(),await f(),e.append&&requestAnimationFrame(()=>{p(),f()}),await Ma(),h()});function v(){if(!l(n))return;const{top:E,right:j,bottom:q,height:F}=l(n).getBoundingClientRect(),Y=b();A(r,E-Y<0&&window.innerHeight-q>E+F,!0);const K=window.innerWidth-j-Y;j+Y>window.innerWidth&&(l(n).style.left=`${K}px`)}function p(){A(o,l(c)>450)}async function f(){if(A(u,0),await new Promise(M=>requestAnimationFrame(M)),!l(n))return;const{top:E,height:j}=l(n).getBoundingClientRect(),q=b(),F=e.append?parseInt(window.getComputedStyle(l(n)).gap):0,Y=l(o)?l(d)+F:0,K=l(r)?window.innerHeight-E-q-Y:E+j-Y-q;A(u,Math.min(K,window.innerHeight*.8),!0)}function b(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function h(){var Y;if(!((Y=l(n))!=null&&Y.firstChild))return;const E=l(n).firstChild,{offsetHeight:j,scrollHeight:q,scrollTop:F}=E;q<=j?A(s,!1):A(s,F+j<q)}var _=rh();let g,k;var w=x(_),C=x(w);He(C,()=>e.children);var R=S(C,2);{var I=E=>{var j=ih(),q=x(j),F=x(q);th(F),Ie(3,j,()=>St,()=>({duration:100})),y(E,j)};B(R,E=>{l(s)&&E(I)})}var z=S(w,2);{var U=E=>{var j=ah(),q=x(j);He(q,()=>e.bubble),Ie(7,j,()=>ua,()=>l(a)),y(E,j)};B(z,E=>{e.bubble&&E(U)})}var D=S(z,2);{var P=E=>{var j=nh(),q=x(j);He(q,()=>e.append),Ie(7,j,()=>ua,()=>l(a)),Mt(j,"clientHeight",F=>A(d,F)),y(E,j)};B(D,E=>{e.append&&l(o)&&E(P)})}rt(_,E=>A(n,E),()=>l(n)),H(()=>{g=_e(_,1,"popover svelte-wxwoko",null,g,{flip:l(r),inline:i,"has-bubble":!!e.bubble&&i}),k=We(_,"",k,{"--max-height":l(u)?l(u)+"px":null})}),ge("scroll",w,h),Ie(7,w,()=>ua,()=>l(a)),Mt(_,"clientHeight",E=>A(c,E)),y(t,_),se()}var oh=T('<div class="title-popover svelte-d1moe8" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function sh(t,e){oe(e,!0);const i=u=>{var v=ye(),p=Q(v);{var f=b=>{ys(b,{get campaign(){return n}})};B(p,b=>{n&&b(f)})}y(u,v)},a=u=>{var v=ye(),p=Q(v);{var f=b=>{bs(b,{get campaign(){return r},compact:!0})};B(p,b=>{r&&b(f)})}y(u,v)},n=Oa("top_scroll"),r=Oa("card");let o=W(null);pe(ve.TitlePopoverView,e.title),$e(()=>{s();const u=Date.now();return()=>pe(ve.TitlePopoverClose,e.title,{time_spent:Date.now()-u})});function s(){const u=e.event.target;if(!(u!=null&&u.getClientRects))return;const v=Array.from(u.getClientRects()),f=v.map(h=>h.x).map(h=>Math.abs(h-e.event.clientX)),b=v[f.indexOf(Math.min(...f))];l(o).style.top=b.top+window.scrollY+"px",l(o).style.left=b.left+window.scrollX+"px",l(o).style.height=b.height+"px"}var c=oh(),d=x(c);{let u=V(()=>r?a:null),v=V(()=>n?i:null);lh(d,{get append(){return l(u)},get bubble(){return l(v)},children:(p,f)=>{Xr(p,{get title(){return e.title},small:!0})},$$slots:{default:!0}})}rt(c,u=>A(o,u),()=>l(o)),y(t,c),se()}let Ln=null,Hi=null;function ch(t,e){if(window.matchMedia("(pointer: coarse)").matches)return;Hi&&Mn();const i=t.currentTarget;Ln=i,setTimeout(()=>{Ln===i&&(Hi=Lt(sh,{target:al(),props:{event:t,title:e.title_details}}))},100)}async function Mn(t=!0){if(Hi){const e=Di(Hi,{outro:t});Ln=null,Hi=null,await e}document.querySelectorAll("[data-playpilot-title-popover]").forEach(e=>e.remove())}function dh(t){if(!Hi)return;const e=t.target;e.hasAttribute("data-playpilot-title-popover")||e.closest("[data-playpilot-title-popover]")||e.hasAttribute(wi)||e.closest(vi)||Mn()}function uh(){Ln=null}function vh(){return!!Hi}var ph=T('<div class="content svelte-c2erhr"><!></div>'),fh=T("<div><!></div>"),hh=T('<button class="arrow left svelte-c2erhr" aria-label="Previous" aria-live="polite"><!></button>'),gh=T('<button class="arrow right svelte-c2erhr" aria-label="Next" aria-live="polite"><!></button>'),mh=T("<!> <!>",1),yh=T('<div class="rail-modal svelte-c2erhr"><!></div> <div class="close svelte-c2erhr"><!></div>',1);function bh(t,e){oe(e,!0);const i=L(e,"initialIndex",3,0),a=300;let n,r=W(!1);$e(()=>{setTimeout(()=>{n==null||n.setIndex(i()),requestAnimationFrame(()=>A(r,!0))})}),Ha(t,{blur:!0,dialog:s=>{var c=yh(),d=Q(c);We(d,"",{},{"--transition-duration":"300ms"});var u=x(d);{const f=(_,g)=>{let k=()=>g==null?void 0:g().currentIndex;var w=ye(),C=Q(w);je(C,17,()=>e.items,qe,(R,I,z)=>{var U=fh();let D;U.__click=()=>n.setIndex(z);var P=x(U);{var E=j=>{var q=ph(),F=x(q);He(F,()=>e.each,()=>l(I),k),Ie(3,q,()=>St,()=>({duration:l(r)?a:0})),y(j,q)};B(P,j=>{(Math.abs(z-k())===1||k()===z)&&j(E)})}H(()=>D=_e(U,1,"item svelte-c2erhr",null,D,{active:z===k()})),y(R,U)}),y(_,w)},b=(_,g)=>{let k=()=>g==null?void 0:g().setIndex,w=()=>g==null?void 0:g().currentIndex,C=()=>g==null?void 0:g().reachedEnd;var R=mh(),I=Q(R);{var z=P=>{var E=hh();E.__click=()=>k()(w()-1);var j=x(E);Zt(j,{size:21,direction:"left",title:"Previous"}),y(P,E)};B(I,P=>{w()>0&&P(z)})}var U=S(I,2);{var D=P=>{var E=gh();E.__click=()=>k()(w()+1);var j=x(E);Zt(j,{size:21,title:"Next"}),y(P,E)};B(U,P=>{C()||P(D)})}y(_,R)};let h=V(()=>l(r)?a:0);rt(ns(u,{threshold:40,moveThreshold:40,get transitionDuration(){return l(h)},children:f,controls:b,$$slots:{default:!0,controls:!0}}),_=>n=_,()=>n)}var v=S(d,2),p=x(v);Fa(p,{size:"42px",onclick:()=>el(),"aria-label":"Close",children:(f,b)=>{Sn(f,{size:24})},$$slots:{default:!0}}),Ie(7,v,()=>va),y(s,c)},$$slots:{dialog:!0}}),se()}xe(["click"]);function _h(t,e){oe(e,!0);const i=L(e,"initialIndex",3,0);bh(t,{get items(){return e.titles},get initialIndex(){return i()},each:(n,r=bt,o=bt)=>{{let s=V(()=>{var c;return r().sid===((c=e.titles[o()])==null?void 0:c.sid)});Xr(n,{get title(){return r()},get useVideoBackground(){return l(s)}})}},$$slots:{each:!0}}),se()}const st=[];function xi({type:t="title",event:e=null,injection:i=null,data:a=null,scrollPosition:n=0,returnToTitle:r=null,props:o={}}={}){if(e&&Jo(e))return;e==null||e.preventDefault(),st!=null&&st.length&&$r();const s=al(),c={initialScrollPosition:n,...o},d=xh({type:t,target:s,data:a,props:c});r&&_s({type:t,injection:i,data:r}),_s({type:t,injection:i,data:a,scrollPosition:n,component:d})}function xh({type:t="title",target:e,data:i,props:a={}}){return t==="participant"?Lt(Jf,{target:e,props:{participant:i,...a}}):t==="explore"?Lt(Qf,{target:e,props:{...a}}):t==="titles-rail"?Lt(_h,{target:e,props:{titles:i,...a}}):Lt(Vf,{target:e,props:{title:i,...a}})}function _s({type:t="title",injection:e=null,data:i,scrollPosition:a=0,component:n}){st.push({type:t,injection:e,data:i,scrollPosition:a,component:n})}function $r(t=!0){st.length&&(Sh(),Di(st[st.length-1].component,{outro:t}))}function wh(t=!0){$r(t),st.pop()}function el(t=!0){for($r(t);st.length>0;)st.pop()}function xs(){return st[st.length-2]||null}function kh(){if(st.length<2)return;wh();const t=st.pop();t&&xi({...t})}function Sh(){const t=`[data-playpilot-link-injections] ${window.innerWidth>Ni?".modal":".dialog"}`,e=document.querySelector(t);e!=null&&e.scrollTop&&(st[st.length-1].scrollPosition=e.scrollTop)}function Th(t,e){if(Jo(t))return;let i=t.target;if(!i||(i.hasAttribute(wi)||(i=i.closest(vi)),!i))return;const a=i.getAttribute(wi);if(!a)return;const n=e.find(r=>a===r.key);n&&(t.preventDefault(),$f(()=>{Mn(!1),xi({event:t,injection:n,data:n.title_details})},!Yr.current&&window.innerWidth>=Ni&&!window.matchMedia("(pointer: coarse)").matches))}var Eh=T(' <span class="svelte-1to4glm"><button class="svelte-1to4glm"> </button></span>',1),Ph=T('<!> <a target="_blank"> </a>',1),Ch=T(" <!>.",1),Ih=T("<!> <br/>",1),jh=T(" <br/>",1),zh=T('<span class="svelte-1to4glm"><!></span>'),Ah=T('<p class="svelte-1to4glm"></p>');function Lh(t,e){oe(e,!0);const i=L(e,"onclickmodal",3,()=>null);function a(c,d){pe(ve.AfterArticlePlaylinkClick,c,{playlink:d})}function n(c,d,u){pe(ve.AfterArticleModalButtonClick,d),i()(c,u)}var r=ye(),o=Q(r);{var s=c=>{var d=Ah();je(d,21,()=>e.linkInjections,qe,(u,v)=>{const p=V(()=>{const{key:k,title:w,title_details:C,after_article_style:R}=l(v);return{key:k,title:w,title_details:C,after_article_style:R}}),f=V(()=>{var k;return((k=l(p).title_details)==null?void 0:k.providers)||[]});var b=zh(),h=x(b);{var _=k=>{var w=Ih(),C=Q(w);{var R=z=>{var U=Eh(),D=Q(U),P=S(D);P.__click=q=>q.stopPropagation();var E=x(P);E.__click=q=>n(q,l(p).title_details,l(v));var j=x(E);H((q,F)=>{X(D,`"${l(p).title??""}" ${q??""} `),X(j,F)},[()=>ue("Is Available To Stream"),()=>ue("View Streaming Options")]),y(z,U)},I=z=>{var U=Ch(),D=Q(U),P=S(D);je(P,17,()=>l(f),qe,(E,j,q)=>{let F=()=>l(j).name,Y=()=>l(j).url;var K=Ph(),M=Q(K);{var N=Z=>{var ne=Qe();H(de=>X(ne,de),[()=>q===l(f).length-1?`, ${ue("And")}`:","]),y(Z,ne)};B(M,Z=>{q&&Z(N)})}var G=S(M,2);G.__click=()=>a(l(p).title_details,F());var J=x(G);H(()=>{re(G,"href",Y()),X(J,F())}),y(E,K)}),H(E=>X(D,`"${l(p).title??""}" ${E??""} `),[()=>ue("Is Available To Stream On")]),y(z,U)};B(C,z=>{l(p).after_article_style==="modal_button"?z(R):z(I,!1)})}y(k,w)},g=k=>{var w=jh(),C=Q(w);H(R=>X(C,`"${l(p).title??""}" ${R??""} `),[()=>ue("Title Unavailable Suffix")]),y(k,w)};B(h,k=>{l(f).length?k(_):k(g,!1)})}H(()=>re(b,"data-playpilot-injection-key",l(p).key)),y(u,b)}),y(c,d)};B(o,c=>{e.linkInjections.length&&c(s)})}y(t,r),se()}xe(["click"]);let Va=null;function Mh(t,e){var o,s;if(Va||!e.length)return;const i=document.createElement("div"),a=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,n=(a?document.querySelector(a):null)||t[t.length-1],r=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",n.insertAdjacentElement(r,i),Va=Lt(Lh,{target:i,props:{linkInjections:e,onclickmodal:(c,d)=>xi({event:c,injection:d,data:d.title_details})}})}function qh(){var t;Va&&(Di(Va),(t=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||t.remove(),Va=null)}var Dh=T('<p class="svelte-1epbbn0"> </p>');function Rh(t,e){oe(e,!1),Tr();var i=Dh(),a=x(i);H(n=>X(a,n),[()=>{var n,r;return((r=(n=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.in_text_disclaimer_text)||ue("In-Text Disclaimer")}]),y(t,i),se()}let Ua=null;function Nh(t){var r,o,s,c,d,u;if(!((o=(r=window.PlayPilotLinkInjections)==null?void 0:r.config)!=null&&o.in_text_disclaimer_enabled)||Ua)return;const e=document.createElement("div"),i=(c=(s=window.PlayPilotLinkInjections)==null?void 0:s.config)==null?void 0:c.in_text_disclaimer_selector,a=(i?document.querySelector(i):null)||t[0],n=((u=(d=window.PlayPilotLinkInjections)==null?void 0:d.config)==null?void 0:u.in_text_disclaimer_insert_position)||"beforebegin";e.dataset.playpilotInTextDisclaimer="true",a.insertAdjacentElement(n,e),Ua=Lt(Rh,{target:e})}function Oh(){var t;Ua&&(Di(Ua),(t=document.querySelector("[data-playpilot-in-text-disclaimer]"))==null||t.remove(),Ua=null)}const wi="data-playpilot-injection-key",vi=`[${wi}]`;function Bh(t,e={aiInjections:[],manualInjections:[]}){il(),Gh();const i=Kh(e);if(!i.length)return[];const a=kt(t.map(d=>d.innerText).join(" ")),r=Yh(i).filter(d=>a.includes(kt(d.sentence))),o={};let s=-1;for(const d of Jh(r)){s++;const u=t.findIndex(C=>kt(C.innerText).includes(kt(d.sentence))),v=t[u];if(!v)continue;const p=Uo(d.title,v,["A"]);if(!(p!=null&&p.nodeValue)||Wo(p)){const C=Uo(d.title,v);if(C&&Wo(C)){o[d.key]="Given text is already inside of a link.";continue}}const{injectionElement:f,linkElement:b}=Fh(d);let h=-1,_=!1;_n(v.innerHTML,d.title)===1&&(h=v.innerHTML.indexOf(d.title));const{phrase_before:k,phrase_after:w}=Hh(v,d);if(h===-1&&(k||w)){const C=[k,d.title,w].filter(Boolean).join(" ");if(h=v.innerHTML.indexOf(C),h===-1){const R=Vd(v.innerHTML,d.title,k||"",w||"");if(R){const{leadingSpaces:I,trailingSpaces:z}=Ud(R.match);b.innerHTML=R.match.trim();const U=R.index+I,D=R.index+R.match.length-z;if(v.innerHTML.slice(U,D).includes("href="))continue;tl(v.innerHTML,d.title,v,f,U,D)&&(h=R.index,_=!0)}}}if(h===-1&&(p!=null&&p.nodeValue)){const C=v.innerHTML.indexOf(p.nodeValue),R=v.innerHTML.indexOf(d.sentence),I=R===-1?v.innerHTML.indexOf(d.sentence.slice(0,20)):-1,z=d.sentence.split(" ")[0],D=_n(v.innerHTML,z)===1?v.innerHTML.indexOf(z):-1,P=Rd(r.slice(0,s+1),d,["title","sentence"])-1,E=Wd(p.nodeValue,v,P);h=Math.max(C,I,E,D,R,0)}if(h!==-1&&!_&&!tl(v.innerHTML,d.title,v,f,h)){const C=Kd(d.title,v.innerHTML);C>-1?tl(v.innerHTML,d.title,v,f,C):o[d.key]="Injection would have lead to broken HTML."}}Uh(r),Vh();const c=Zh(i);return c.length&&Mh(t,c),document.querySelector(vi)&&Nh(t),i.filter(d=>d.title_details).map((d,u)=>{const v=!d.manual&&Xh(d,u,i),p=d.duplicate??v;p&&(o[d.key]=v?"Injection was manually removed.":"Injection was marked as duplicate.");const f=document.querySelector(`[${wi}="${d.key}"]`),b=qn(d)&&!d.inactive&&!d.removed&&!d.after_article&&!f,h=r.find(g=>g.key===d.key),_=b?o[d.key]||(h?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...d,inactive:d.inactive??!1,duplicate:p,failed:b,failed_message:_}})}function Fh(t){var a;const e=document.createElement("span");e.dataset.playpilotInjectionKey=t.key;const i=document.createElement("a");return i.dataset.playpilotPosterUrl=(a=t.title_details)==null?void 0:a.standing_poster,i.innerText=t.title,i.href=t.playpilot_url,i.target="_blank",i.rel="noopener nofollow noreferrer",e.insertAdjacentElement("beforeend",i),{injectionElement:e,linkElement:i}}function tl(t,e,i,a,n,r=-1){const o=u=>Array.from(u.querySelectorAll(`a, ${vi}`)).filter(v=>!v.innerText).length,s=document.createElement("div");s.innerHTML=t;const c=o(s),d=s.innerText;return r>0?s.innerHTML=Fd(t,a.outerHTML,n,r):s.innerHTML=Bd(t,e,a.outerHTML,n),Math.abs(s.innerText.length-d.length)>1||c!=o(s)?!1:(i.innerHTML=s.innerHTML,!0)}function Hh(t,e){const{phrase_before:i,phrase_after:a}=e;if(i||a)return{phrase_before:i,phrase_after:a};if(_n(t.innerText,e.title)!==1)return{phrase_before:null,phrase_after:null};const r=t.innerText.indexOf(e.title),o=Ko(t,r,r+e.title.length);return{phrase_before:o.before,phrase_after:o.after}}function Vh(){const t=Array.from(document.querySelectorAll(`${vi} a`)),e=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];for(const i of t){const a=getComputedStyle(i);for(const n of e)a.getPropertyValue(n)&&(i.dataset.usedCssVariables=`${i.dataset.usedCssVariables||""} ${n}`)}}function Uh(t){window.addEventListener("mousemove",dh),window.addEventListener("click",i=>Th(i,t)),document.querySelectorAll(vi).forEach(i=>{const a=i.dataset.playpilotInjectionKey,n=t.find(r=>a===r.key);n&&(i.addEventListener("mouseenter",r=>{vh()||ch(r,n)}),i.addEventListener("mouseleave",uh))})}function il(){document.querySelectorAll(vi).forEach(e=>Wh(e.getAttribute(wi)||"")),qh(),Oh(),el(!1),Mn(!1)}function Wh(t){var n;const e=document.querySelector(`[${wi}="${t}"]`);if(!e)return;e.querySelectorAll("[data-playpilot-element]").forEach(r=>r.remove());const a=(n=e.querySelector("a"))==null?void 0:n.innerHTML;e.outerHTML=a||""}function Gh(){document.querySelectorAll('a[href*="playpilot.com"]').forEach(e=>{e.closest(vi)||/\/movie|show\//.test(e.href)&&(e.outerHTML=e.innerHTML)})}function Kh({aiInjections:t,manualInjections:e}){return[...e.map(i=>({...i,manual:!0})),...t]}function ws(t){return{aiInjections:t.filter(e=>!e.manual),manualInjections:t.filter(e=>e.manual)}}function ks(t){return!t.inactive&&!t.removed&&!t.duplicate&&!!t.title_details&&qn(t)}function qn(t){return t.in_text||t.in_text===void 0?!0:!!t.after_article}function Yh(t){return Ss(t).filter(e=>e.in_text!==!1&&ks(e))}function Zh(t){return Ss(t).filter(e=>e.after_article===!0&&ks(e))}function Ss(t){return t.filter(e=>e.removed||e.inactive?!1:e.manual&&!e.removed&&!e.inactive?!0:!t.some(i=>i.manual&&(i.removed||i.inactive)&&Ts(i,e)))}function Jh(t){return t.slice().sort((e,i)=>{if(e.sentence<i.sentence)return-1;if(e.sentence>i.sentence)return 1;const a=i.title.length-e.title.length;return a!==0?a:0})}function Xh(t,e,i){return i.some((a,n)=>e!==n&&a.manual&&Ts(a,t))}function Ts(t,e){return t.title===e.title&&kt(t.sentence)===kt(e.sentence)}function al(){return document.querySelector("[data-playpilot-link-injections]")||document.body}async function Qh(){const t=ui();if(!t)throw new Error("No token was provided");try{return await await Yt(`/domains/config?api-token=${t}`)||null}catch{return null}}var $h=Fe('<svg width="8" height="4" viewBox="0 0 8 4" fill="none"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function eg(t,e){const i=L(e,"expanded",3,!1);var a=$h();let n;H(()=>n=_e(a,0,"svelte-abbsts",null,n,{expanded:i()})),y(t,a)}var tg=Fe('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ig(t){var e=tg();y(t,e)}var ag=T('<button><div class="label svelte-1201akx"><!></div> <div class="track svelte-1201akx"><div class="knob svelte-1201akx"></div></div></button>');function nl(t,e){oe(e,!0);let i=L(e,"active",15),a=L(e,"fullwidth",3,!1),n=L(e,"label",3,""),r=L(e,"onclick",3,()=>null);function o(){i(!i()),r()(i())}var s=ag();let c;s.__click=o;var d=x(s),u=x(d);He(u,()=>e.children),H(()=>{c=_e(s,1,"switch svelte-1201akx",null,c,{active:i(),fullwidth:a()}),re(s,"aria-label",`Toggle ${n()??""} ${i()?"off":"on"}`)}),y(t,s),se()}xe(["click"]);var ng=T('<input type="text" autocomplete="off" class="svelte-v3h1om"/>');function rl(t,e){oe(e,!0);let i=L(e,"value",15),a=L(e,"label",3,""),n=L(e,"name",3,""),r=L(e,"readonly",3,!1),o=L(e,"oninput",3,()=>null);var s=ng();s.__input=function(...c){var d;(d=o())==null||d.apply(this,c)},H(()=>{re(s,"name",n()),re(s,"aria-label",a()),re(s,"placeholder",a()),s.readOnly=r()}),ca(s,i),y(t,s),se()}xe(["input"]);var rg=Fe('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),lg=Fe('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),og=Fe('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function Es(t,e){const i=L(e,"align",3,"bottom");var a=og(),n=x(a);{var r=s=>{var c=rg();y(s,c)},o=s=>{var c=ye(),d=Q(c);{var u=v=>{var p=lg();y(v,p)};B(d,v=>{i()==="center"&&v(u)},!0)}y(s,c)};B(n,s=>{i()==="bottom"?s(r):s(o,!1)})}y(t,a)}var sg=T("<div><!></div>");function Vi(t,e){const i=L(e,"type",3,"error"),a=L(e,"fixed",3,!1);var n=sg();let r;var o=x(n);He(o,()=>e.children),H(()=>r=_e(n,1,`alert ${i()??""}`,"svelte-1v44877",r,{fixed:a()})),y(t,n)}var cg=T("<!> In-text Playlink",1),dg=T("<!> Bottom Playlink",1),ug=T('<div class="alert svelte-1fv3ko3"><!></div>'),vg=T('<div><div class="label svelte-1fv3ko3">Bottom playlinks style</div> <div class="group svelte-1fv3ko3" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text">Playlinks sentence</button> <button role="option" id="playlinks-after-article">Modal button</button> <div></div></div></div>'),pg=T('<div class="switches svelte-1fv3ko3"><!> <!></div> <!> <!>',1);function fg(t,e){oe(e,!0);const i=L(e,"linkInjection",7),a=V(()=>i().after_article_style==="modal_button");var n=pg(),r=Q(n),o=x(r);{let p=V(()=>i().in_text??!0);nl(o,{fullwidth:!0,get active(){return l(p)},onclick:f=>{i().in_text=f,i().manual=!0},label:"In-text Playlink",children:(f,b)=>{var h=cg(),_=Q(h);Es(_,{align:"center"}),y(f,h)},$$slots:{default:!0}})}var s=S(o,2);{let p=V(()=>i().after_article??!1);nl(s,{fullwidth:!0,get active(){return l(p)},onclick:f=>{i().after_article=f,i().manual=!0},label:"Bottom Playlink",children:(f,b)=>{var h=dg(),_=Q(h);Es(_,{align:"bottom"}),y(f,h)},$$slots:{default:!0}})}var c=S(r,2);{var d=p=>{var f=ug(),b=x(f);Vi(b,{type:"warning",children:(h,_)=>{var g=Qe("At least one layout option must be selected for the playlink to be visible.");y(h,g)},$$slots:{default:!0}}),Ie(3,f,()=>Ba,()=>({duration:200})),y(p,f)};B(c,p=>{qn(i())||p(d)})}var u=S(c,2);{var v=p=>{var f=vg(),b=S(x(f),2),h=x(b);h.__click=()=>i().after_article_style="playlinks";let _;var g=S(h,2);g.__click=()=>i().after_article_style="modal_button";let k;var w=S(g,2);let C;H(()=>{re(b,"aria-activedescendant",`playlinks-${l(a)?"after-article":"in-text"}`),re(h,"aria-selected",!l(a)||null),_=_e(h,1,"svelte-1fv3ko3",null,_,{active:!l(a)}),re(g,"aria-selected",l(a)||null),k=_e(g,1,"svelte-1fv3ko3",null,k,{active:l(a)}),C=_e(w,1,"active-marker svelte-1fv3ko3",null,C,{right:l(a)})}),Ie(3,f,()=>Ba,()=>({duration:100})),y(p,f)};B(u,p=>{i().after_article&&p(v)})}y(t,n),se()}xe(["click"]);var hg=T('<option class="svelte-1yg5wso"> </option>'),gg=T('<div class="sent svelte-1yg5wso">Report has been sent, thank you! Closing window...</div>'),mg=T('<button class="submit svelte-1yg5wso">Send report</button>'),yg=T('<div class="form svelte-1yg5wso"><div class="heading svelte-1yg5wso">Report issue</div> <div class="info svelte-1yg5wso"><div><strong class="svelte-1yg5wso">Title</strong> </div> <div><strong class="svelte-1yg5wso">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-1yg5wso"><option class="svelte-1yg5wso">Select an issue...</option><!></select> <div><!></div></div>');function bg(t,e){oe(e,!0);const i=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let a=W(""),n=W(!1);function r(){var o,s;l(a)&&(pe(ve.ManualReport,e.linkInjection.title_details,{report_reason:l(a),sid:e.linkInjection.sid,title:e.linkInjection.title,sentence:e.linkInjection.sentence,failed:(o=e.linkInjection.failed)==null?void 0:o.toString(),failed_message:e.linkInjection.failed_message,manual:(s=e.linkInjection.manual)==null?void 0:s.toString()}),A(n,!0),setTimeout(e.onclose,3e3))}Ha(t,{get onclose(){return e.onclose},children:(o,s)=>{var c=yg(),d=x(c);mt(d,(I,z)=>ze==null?void 0:ze(I,z),()=>2);var u=S(d,2),v=x(u),p=S(x(v)),f=S(v,2),b=S(x(f)),h=S(u,4),_=x(h);_.value=_.__value="";var g=S(_);je(g,17,()=>i,qe,(I,z)=>{let U=()=>l(z).value,D=()=>l(z).label;var P=hg();P.__click=()=>A(a,U(),!0);var E=x(P),j={};H(()=>{X(E,D()),j!==(j=U())&&(P.value=(P.__value=U())??"")}),y(I,P)});var k=S(h,2),w=x(k);{var C=I=>{var z=gg();Ie(1,z,()=>St,()=>({duration:200})),y(I,z)},R=I=>{var z=mg();z.__click=r,H(()=>z.disabled=!l(a)),y(I,z)};B(w,I=>{l(n)?I(C):I(R,!1)})}H(I=>{X(p,`: ${e.linkInjection.title??""}`),X(b,`:
|
|
11
11
|
${I??""}`)},[()=>Go(e.linkInjection.sentence,e.linkInjection.title,100)]),dd(h,()=>l(a),I=>A(a,I)),y(o,c)},$$slots:{default:!0}}),se()}xe(["click"]);var _g=T('<button class="expand-sentence svelte-tlh9c3"> </button>'),xg=T('<button class="context-menu-action svelte-tlh9c3">Remove</button> <button class="context-menu-action svelte-tlh9c3">Report issue</button>',1),wg=T('<div class="warning svelte-tlh9c3" aria-label="Invalid playlink settings"><!></div>'),kg=T('<div class="actions svelte-tlh9c3"><button class="expand svelte-tlh9c3" aria-label="Expand"><!></button> <!> <!></div>'),Sg=T('<div class="expanded svelte-tlh9c3"><div class="label svelte-tlh9c3">Link URL</div> <!> <div class="label offset svelte-tlh9c3">Layout options</div> <div class="type-select svelte-tlh9c3"><!></div></div>'),Tg=T('<div><div class="header svelte-tlh9c3"><img class="poster svelte-tlh9c3" alt="" width="32" height="48"/> <div class="info svelte-tlh9c3"><div class="title svelte-tlh9c3"> </div> <div class="sentence svelte-tlh9c3"><!> <!></div></div> <div class="context-menu svelte-tlh9c3"><!></div></div> <div class="content svelte-tlh9c3"><!> <!></div></div>');function Eg(t,e){oe(e,!0);const i=L(e,"linkInjection",15),a=L(e,"onremove",3,()=>null),n=L(e,"onhighlight",3,()=>null),r=V(()=>i()||{}),o=V(()=>l(r).key),s=V(()=>l(r).sentence),c=V(()=>l(r).title_details),d=V(()=>l(r).failed),u=V(()=>l(r).failed_message),v=V(()=>l(r).inactive),p=V(()=>l(c)),f=V(()=>Go(i().sentence,i().title,60));let b=W(!1),h=W(!1),_=W(!1),g=W(null);$e(()=>{l(d)&&pe(ve.InjectionFailed,l(p),{phrase:i().title,sentence:l(s)})});function k($=!0){R().forEach(le=>{le.classList.toggle("playpilot-injection-highlight",$)})}function w($){let ie=$.target,le=ie==null?void 0:ie.dataset.playpilotInjectionKey;ie&&!le&&(ie=ie.closest(`[data-playpilot-injection-key="${l(o)}"]`),le=ie==null?void 0:ie.dataset.playpilotInjectionKey),A(_,le===l(o)),l(g)&&l(_)&&n()(l(g))}function C($){requestAnimationFrame(()=>k());const ie=$.target;if(["BUTTON","INPUT"].includes(ie.nodeName)||ie.closest("button")||ie.closest("input"))return;const le=R()[0];le&&le.scrollIntoView({behavior:"smooth"})}function R(){const $=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${l(o)}"]`));return $.length?$:zr(da()).filter(ie=>kt(ie.innerText).includes(kt(i().sentence)))||[]}function I(){const $=Lt(bg,{target:document.body,props:{linkInjection:i(),onclose:()=>Di($)}})}var z=Tg();ge("mouseover",Pe,w);let U;z.__click=C;var D=x(z),P=x(D),E=S(P,2),j=x(E),q=x(j),F=S(j,2),Y=x(F);nd(Y,()=>(l(h)?l(s):l(f)).replace(i().title,`<em>${i().title}</em>`));var K=S(Y,2);{var M=$=>{var ie=_g();ie.__click=()=>A(h,!l(h));var le=x(ie);H(()=>X(le,l(h)?"Less":"More")),y($,ie)};B(K,$=>{l(f).length<l(s).length&&$(M)})}var N=S(E,2),G=x(N);hs(G,{label:"More options",children:($,ie)=>{var le=xg(),me=Q(le);me.__click=function(...ae){var ee;(ee=a())==null||ee.apply(this,ae)};var Le=S(me,2);Le.__click=I,y($,le)},$$slots:{default:!0}});var J=S(D,2),Z=x(J);{var ne=$=>{Vi($,{children:(ie,le)=>{var me=Qe();H(()=>X(me,l(u))),y(ie,me)},$$slots:{default:!0}})},de=$=>{var ie=kg(),le=x(ie);le.__click=()=>A(b,!l(b));var me=x(le);eg(me,{get expanded(){return l(b)}});var Le=S(le,2);{var ae=fe=>{var Ae=wg(),De=x(Ae);ig(De),Ie(3,Ae,()=>St,()=>({duration:100})),y(fe,Ae)};B(Le,fe=>{qn(i())||fe(ae)})}var ee=S(Le,2);{let fe=V(()=>l(v)?"Inactive":"Visible"),Ae=V(()=>!i().inactive);nl(ee,{get label(){return l(fe)},get active(){return l(Ae)},onclick:De=>{i(i().inactive=!De,!0),i(i().manual=!0,!0)},children:(De,Ke)=>{var te=Qe();H(()=>X(te,l(v)?"Inactive":"Visible")),y(De,te)},$$slots:{default:!0}})}H(()=>re(le,"aria-expanded",l(b))),y($,ie)};B(Z,$=>{l(d)?$(ne):$(de,!1)})}var Se=S(Z,2);{var Ee=$=>{var ie=Sg(),le=S(x(ie),2);rl(le,{oninput:()=>i(i().manual=!0,!0),label:"Playlink URL",get value(){return i().playpilot_url},set value(ae){i(i().playpilot_url=ae,!0)}});var me=S(le,4),Le=x(me);fg(Le,{get linkInjection(){return i()}}),Ie(3,ie,()=>Ba,()=>({duration:100})),y($,ie)};B(Se,$=>{l(b)&&$(Ee)})}rt(z,$=>A(g,$),()=>l(g)),H($=>{U=_e(z,1,"item svelte-tlh9c3",null,U,{highlighted:l(_),inactive:l(v)}),re(P,"src",$),X(q,l(p).title)},[()=>pa(l(p).standing_poster)]),ge("mouseenter",z,()=>k(!0)),ge("mouseleave",z,()=>k(!1)),ge("error",P,({target:$})=>$.src=Pr),Ie(6,z,()=>Ba,()=>({duration:200})),y(t,z),se()}xe(["click"]);var Pg=T('<button class="drag-handle svelte-1fk5ijl" aria-label="Move editor"></button>');function Cg(t,e){oe(e,!0);let i=L(e,"element",7),a=L(e,"position",23,()=>({x:0,y:0})),n=L(e,"limit",19,()=>({x:0,y:0})),r=L(e,"onchange",3,()=>null),o=!1,s={x:0,y:0},c=a();$e(()=>{d(a().x,a().y)});function d(h,_){const g=window.innerWidth,k=window.innerHeight,w=i().clientWidth,C=i().clientHeight;h=Math.min(Math.max(h,n().x),g-w-n().x),_=Math.min(Math.max(_,n().y),k-C-n().y),i().style.right=h+"px",i().style.bottom=Math.max(_,n().y)+"px",a({x:h,y:_}),r()(a())}function u(h){var _,g;return{x:h.pageX||((_=h.touches)==null?void 0:_[0].pageX)||0,y:h.pageY||((g=h.touches)==null?void 0:g[0].pageY)||0}}function v(h){o=!0,s=u(h),c=a()}function p(h){if(!o)return;const _=u(h),g=_.x-s.x,k=_.y-s.y,w=c.x-g,C=c.y-k;d(w,C)}function f(){o&&(o=!1)}var b=Pg();ge("mousemove",Pe,p),ge("touchmove",Pe,p,void 0,!0),ge("mouseup",Pe,f),ge("touchend",Pe,f),ge("resize",Pe,()=>d(a().x,a().y)),b.__mousedown=v,b.__touchstart=v,y(t,b),se()}xe(["mousedown","touchstart"]);var Ig=T('<button class="resize-handle svelte-iir57j" aria-label="Move editor"></button>');function jg(t,e){oe(e,!0);let i=L(e,"element",7),a=L(e,"height",7,200),n=L(e,"onchange",3,()=>null);const r=16;let o=!1,s=0,c=a();$e(()=>{a()&&d(a())});function d(h){const _=window.getComputedStyle(i()).minHeight||"0",g=Math.max(parseInt(_),Math.min(h,f()));i().style.height=`${g}px`,a(g),n()(g)}function u(h){var _,g;o=!0,s=h.pageY||((g=(_=h.touches)==null?void 0:_[0])==null?void 0:g.pageY)||0,c=i().clientHeight}function v(h){var w,C;if(!o)return;const _=h.pageY||((C=(w=h.touches)==null?void 0:w[0])==null?void 0:C.pageY)||0,g=s-_,k=c+g;d(k)}function p(){o=!1}function f(){const h=window.innerHeight-i().getBoundingClientRect().bottom;return Math.max(window.innerHeight-r*2-h,0)}var b=Ig();ge("mousemove",Pe,v),ge("touchmove",Pe,v,void 0,!0),ge("mouseup",Pe,p),ge("touchend",Pe,p),ge("resize",Pe,()=>{a()&&d(a())}),b.__mousedown=u,b.__touchstart=u,y(t,b),se()}xe(["mousedown","touchstart"]);function zg(t,e=t.anchorNode){if(!t.anchorNode||!e)return{start:-1,end:-1};const i=t.toString().trim(),a=t.toString().search(/\S/);if(t.anchorNode===e&&e.nodeType===Node.TEXT_NODE){const d=Math.min(t.anchorOffset,t.focusOffset)+a;return{start:d,end:d+i.length}}const n=t.getRangeAt(0),r=n.cloneRange();r.selectNodeContents(e),r.setEnd(n.startContainer,n.startOffset);const s=r.toString().length+a,c=s+i.length;return{start:s,end:c}}var Ag=Fe('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Lg(t){var e=Ag();y(t,e)}async function Mg(t){const e=ui();if(!e)throw new Error("No token was provided");return await Yt(`/search/titles/?api-token=${e}&query=${t}`)}var qg=Fe('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function Dg(t){var e=qg();y(t,e)}var Rg=T("<div> </div>"),Ng=T('<button><img class="poster svelte-fntasr" alt="" width="28" height="42"/> <div class="content"><div class="name svelte-fntasr"> </div> <div class="meta svelte-fntasr"><div class="imdb svelte-fntasr"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-fntasr"><!></a></button>');function Ps(t,e){oe(e,!0);const i=L(e,"hoverable",3,!0),a=L(e,"onclick",3,()=>null);var n=Ng();let r;n.__click=function(...I){var z;(z=a())==null||z.apply(this,I)};var o=x(n),s=S(o,2),c=x(s),d=x(c),u=S(c,2),v=x(u),p=x(v);Cn(p,{});var f=S(p),b=S(v,2),h=x(b),_=S(b,2),g=x(_),k=S(_,2);{var w=I=>{var z=Rg(),U=x(z);H(()=>X(U,`${e.title.length??""} min`)),y(I,z)};B(k,I=>{e.title.length&&I(w)})}var C=S(s,2);C.__click=I=>I.stopImmediatePropagation();var R=x(C);Dg(R),H((I,z)=>{r=_e(n,1,"item svelte-fntasr",null,r,{hoverable:i()}),re(o,"src",I),X(d,e.title.title),X(f,` ${e.title.imdb_score??""}`),X(h,e.title.year),X(g,e.title.type),re(C,"href",z)},[()=>pa(e.title.standing_poster),()=>Wr(e.title)]),ge("error",o,({target:I})=>I.src=Pr),y(t,n),se()}xe(["click"]);var Og=T('<em class="empty svelte-zmrqec">No results found</em>'),Bg=T('<div class="results svelte-zmrqec" data-testid="search-results"></div>'),Fg=T('<div class="selected svelte-zmrqec"><!></div>'),Hg=T('<div class="search svelte-zmrqec"><!> <!> <!></div>');function Vg(t,e){oe(e,!0);let i=L(e,"onselect",3,()=>null),a=L(e,"query",15),n=W(Ue([])),r=W(null),o=W(!1);Ye(()=>{a()&&s(a())});async function s(h){A(o,!0);try{A(n,await Mg(h),!0)}finally{A(o,!1)}}function c(h){a(h.title),A(r,h,!0),i()(h)}var d=Hg(),u=x(d);rl(u,{oninput:()=>A(r,null),name:"search",label:"Search...",get value(){return a()},set value(h){a(h)}});var v=S(u,2);{var p=h=>{var _=Bg();je(_,21,()=>l(n),g=>g.sid,(g,k)=>{Ps(g,{get title(){return l(k)},onclick:()=>c(l(k))})},g=>{var k=ye(),w=Q(k);{var C=R=>{var I=Og();y(R,I)};B(w,R=>{l(o)||R(C)})}y(g,k)}),y(h,_)};B(v,h=>{a()&&!l(r)&&h(p)})}var f=S(v,2);{var b=h=>{var _=Fg(),g=x(_);Ps(g,{get title(){return l(r)},hoverable:!1}),y(h,_)};B(f,h=>{l(r)&&h(b)})}y(t,d),se()}var Ug=T('<div class="error svelte-12oucrc"><!></div>'),Wg=T('<label for="text" class="svelte-12oucrc">Paired title</label> <!>',1),Gg=T('<section class="layout svelte-12oucrc"><div class="header svelte-12oucrc"><!> <div class="heading svelte-12oucrc">Add Playlink manually</div></div> <p class="svelte-12oucrc">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-12oucrc">Selected text</label> <!> <!> <!> <button class="save svelte-12oucrc">Add playlink</button></section>');function Kg(t,e){oe(e,!0);const i=L(e,"pageText",3,""),a=L(e,"onclose",3,()=>null);let n=W(""),r=W(""),o=W(null),s=W(""),c=W(""),d=W(""),u=W("");$e(v);function v(){const P=window.getSelection();if(!(P!=null&&P.anchorNode)||P.anchorNode.parentElement&&!da().contains(P.anchorNode.parentElement))return;const E=P.toString().trim();if(!E)return;A(d,""),A(n,E,!0);const j=P.getRangeAt(0).cloneContents();if(Array.from(j.childNodes).filter(J=>{var Z;return(Z=J.textContent)==null?void 0:Z.trim()}).find(J=>{var Z;return J.nodeName==="A"||((Z=J.querySelector)==null?void 0:Z.call(J,"a"))})){A(d,"Selection is or contains a link. Injections can not be created around already existing links.");return}A(u,l(n),!0);const{node:F,sentence:Y}=p(P,E);if(!F)return;A(r,Y,!0);const{start:K,end:M}=zg(P,F);(J=>{A(c,J.before,!0),A(s,J.after,!0)})(Ko(F,K,M)),Y.includes(l(c))||A(c,""),Y.includes(l(s))||A(s,"");const N=P.getRangeAt(0).commonAncestorContainer.textContent,G=kt(i());(!N||!G.includes(kt(N)))&&A(d,"Selection was not inside of given content")}function p(P,E){const j=P.getRangeAt(0),q=da();let F=j.startContainer;for(;(F.textContent||"").length<=E.length*3&&F.parentNode&&F.nodeName!=="P"&&F.parentNode.textContent!==q.textContent;)F=F.parentNode;if(!F||!F.textContent)return{node:null,sentence:""};const Y=F.textContent,K=f(F,j.startContainer,j.startOffset),M=f(F,j.endContainer,j.endOffset),N=Y.slice(0,K).lastIndexOf("."),G=Y.slice(M).match(/[.!?\n]/),J=G?M+G.index:Y.length,Z=N===-1?0:N+1,ne=J,de=Y.slice(Z,ne+1).trim();return{node:F,sentence:de}}function f(P,E,j){let q=0;const F=P,Y=K=>{var M;if(K===E)return q+=j,!0;K.nodeType===Node.TEXT_NODE&&(q+=((M=K.textContent)==null?void 0:M.length)||0);for(let N=K.firstChild;N;N=N.nextSibling)if(Y(N))return!0;return!1};return Y(F),q}function b(P){var E,j;A(o,P,!0),(j=(E=window.getSelection())==null?void 0:E.removeAllRanges)==null||j.call(E)}function h(){if(!l(n)||!l(o))return;const P=l(o).type==="movie"?"movie":"show",E=qo+`/${P}/${l(o).slug}`,j={sid:l(o).sid,title:l(n),sentence:l(r),phrase_before:l(c),phrase_after:l(s),playpilot_url:E,key:Vo(l(o).sid),title_details:l(o),manual:!0};e.onsave(j),a()()}var _=Gg();ge("mouseup",Pe,v);var g=x(_),k=x(g);Fa(k,{get onclick(){return a()},size:"24px",children:(P,E)=>{Lg(P)},$$slots:{default:!0}});var w=S(k,2);mt(w,(P,E)=>ze==null?void 0:ze(P,E),()=>2);var C=S(g,6);rl(C,{get value(){return l(n)},label:"Select text on the page",name:"selected-text",readonly:!0});var R=S(C,2);{var I=P=>{var E=Ug(),j=x(E);Vi(j,{children:(q,F)=>{var Y=Qe();H(()=>X(Y,l(d))),y(q,Y)},$$slots:{default:!0}}),y(P,E)};B(R,P=>{l(d)&&P(I)})}var z=S(R,2);{var U=P=>{var E=Wg(),j=S(Q(E),2);Ri(j,()=>l(r)+l(n),q=>{Vg(q,{onselect:b,get query(){return l(u)},set query(F){A(u,F,!0)}})}),y(P,E)};B(z,P=>{l(d)||P(U)})}var D=S(z,2);D.__click=h,H(()=>D.disabled=!l(n)||!l(o)),y(t,_),se()}xe(["click"]);const ll="PlayPilotEditorialSessionId",Cs=5e3,Yg=Cs*2;async function Zg(t){const{ai_enabled:e,injections_enabled:i,ai_last_run:a,session_id:n,session_last_ping:r}=await Bi(t),o=js(n||null,r||null),s={ai_enabled:e,ai_last_run:a,injections_enabled:i,session_id:n,session_last_ping:r};return o?await Is(t):s}async function Is(t){const e=zs(),i=new Date(Date.now()).toISOString(),a={session_id:e,session_last_ping:i.toString()},{ai_enabled:n,injections_enabled:r,ai_last_run:o}=await Bi(t,{params:a});return{ai_enabled:n,ai_last_run:o,injections_enabled:r,...a}}function js(t,e){if(!t||!e)return!0;const i=Date.now(),a=new Date(e),n=zs();return i-a.getTime()>Yg?!0:n===t}function zs(){return sessionStorage.getItem(ll)||Jg()}function Jg(){const t=sessionStorage.getItem(ll)||bn();return sessionStorage.setItem(ll,t),t}var Xg=T('<p class="svelte-16jrr0h"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-16jrr0h">Take over editing</button>',1),Qg=T('<div class="alert svelte-16jrr0h"><!></div>');function $g(t,e){oe(e,!0);const i=L(e,"pageText",3,""),a=L(e,"onpoll",3,()=>null),n=L(e,"onallow",3,()=>null),r=L(e,"ondisallow",3,()=>null),o=L(e,"ontakeover",3,()=>null);let s=null,c=W(!0);$e(()=>(d(),()=>{s&&clearInterval(s)}));function d(){u(),s=setInterval(u,Cs)}async function u(){const h=await Zg(i());h&&(A(c,js(h.session_id||null,h.session_last_ping||null),!0),l(c)?n()():r()(),a()({injectionsEnabled:!!h.injections_enabled,aiEnabled:!!h.ai_enabled}))}function v(){Is(i()),o()()}var p=ye(),f=Q(p);{var b=h=>{var _=Qg(),g=x(_);Vi(g,{type:"warning",children:(k,w)=>{var C=Xg(),R=S(Q(C),2);R.__click=v,y(k,C)},$$slots:{default:!0}}),y(h,_)};B(f,h=>{l(c)||h(b)})}y(t,p),se()}xe(["click"]);var e1=Fe('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function t1(t){var e=e1();y(t,e)}var i1=T('<strong class="svelte-1q9haus">AI processing is disabled.</strong>'),a1=T('<span class="svelte-1q9haus">.</span>'),n1=T(`<strong class="svelte-1q9haus">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1q9haus"> <span class="ellipses svelte-1q9haus"></span></div> <div class="loading-bar svelte-1q9haus"><div class="loading-bar-progress svelte-1q9haus"><div class="loading-bar-fill svelte-1q9haus" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1q9haus"> </div></div>`,1),r1=T('<p class="svelte-1q9haus"><strong class="svelte-1q9haus">AI has finished processing.</strong> <br class="svelte-1q9haus"/> <!></p> <button class="dismiss svelte-1q9haus">Dismiss</button>',1),l1=T('<div class="animator svelte-1q9haus" data-test-id="animator"></div>'),o1=T('<div data-testid="ai-indicator"><div class="content svelte-1q9haus"><div class="icon svelte-1q9haus"><!></div> <div class="svelte-1q9haus"><!></div></div> <div class="border svelte-1q9haus"><!></div></div>');function s1(t,e){const i=L(e,"aiRunning",3,!1),a=L(e,"aiEnabled",3,!1),n=L(e,"message",3,""),r=L(e,"percentage",3,0),o=L(e,"aiInjectionsCount",3,0),s=o();let c=W(!1);var d=ye(),u=Q(d);{var v=p=>{var f=o1();let b;var h=x(f),_=x(h),g=x(_);t1(g);var k=S(_,2),w=x(k);{var C=D=>{var P=i1();y(D,P)},R=D=>{var P=ye(),E=Q(P);{var j=F=>{var Y=n1(),K=S(Q(Y),2),M=x(K),N=S(M);je(N,20,()=>({length:3}),qe,(Ee,$)=>{var ie=a1();y(Ee,ie)});var G=S(K,2),J=x(G),Z=x(J);let ne;var de=S(J,2),Se=x(de);H((Ee,$)=>{X(M,`${n()??""} `),ne=We(Z,"",ne,Ee),X(Se,`${$??""}%`)},[()=>({width:`${Math.max(r(),3)}%`}),()=>Math.floor(r())]),y(F,Y)},q=F=>{var Y=r1(),K=Q(Y),M=S(x(K),4);{var N=Z=>{var ne=Qe("No new injections where found.");y(Z,ne)},G=Z=>{var ne=Qe();H(()=>X(ne,`${o()??""} Injections where found and added to the page.`)),y(Z,ne)};B(M,Z=>{s===o()?Z(N):Z(G,!1)})}var J=S(K,2);J.__click=()=>A(c,!0),y(F,Y)};B(E,F=>{i()?F(j):F(q,!1)},!0)}y(D,P)};B(w,D=>{a()?D(R,!1):D(C)})}var I=S(h,2),z=x(I);{var U=D=>{var P=l1();y(D,P)};B(z,D=>{i()&&D(U)})}H(()=>b=_e(f,1,"ai-indicator svelte-1q9haus",null,b,{running:i()})),y(p,f)};B(u,p=>{l(c)||p(v)})}y(t,d)}xe(["click"]);var c1=T('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700"/>'),d1=T('<div class="handles svelte-7r3240"><div class="handle svelte-7r3240"><!></div> <div class="handle svelte-7r3240"><!></div></div>'),u1=T('<div class="loading svelte-7r3240">Loading...</div>'),v1=T('<div class="bubble svelte-7r3240"> </div> <!>',1),p1=T(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),f1=T('<div class="alert svelte-7r3240"><!></div>'),h1=T('<div class="error svelte-7r3240"><!></div>'),g1=T('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),m1=T('<button class="save svelte-7r3240"> </button>'),y1=T('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),b1=T("<!> <!> <!>",1),_1=T('<div class="panel playpilot-styled-scrollbar svelte-7r3240"><!></div>'),x1=T('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function w1(t,e){oe(e,!0);let i=L(e,"linkInjections",15),a=L(e,"pageText",3,""),n=L(e,"loading",3,!1),r=L(e,"injectionsEnabled",7,!1),o=L(e,"aiStatus",23,()=>({})),s=L(e,"onreinitialize",3,()=>null);const c="editor-position",d="editor-height",u=JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }'),v=parseInt(localStorage.getItem(d)||"0");let p=W(null),f=W(!1),b=W(!1),h=W(!1),_=W(!0),g=W(0),k=W("");const w=V(()=>$a(o().aiEnabled,!1)),C=V(()=>$a(o().aiRunning,!1)),R=V(()=>JSON.stringify(i())),I=V(()=>!l(C)&&l(_)),z=V(()=>l(k)&&l(k)!==l(R)),U=V(()=>i().filter(ae=>ae.title_details&&!ae.removed&&!ae.duplicate&&(ae.manual||!ae.manual&&!ae.failed))),D=V(()=>E(l(U))),P=V(()=>!n()&&wt(()=>o().aiRunning));Ye(()=>{n()||wt(()=>{requestAnimationFrame(()=>A(k,l(R),!0)),M()})});function E(ae){return ae.sort((ee,fe)=>ee.failed!==fe.failed?ee.failed?1:-1:ee.title_details.title.localeCompare(fe.title_details.title))}async function j(){try{A(b,!0),A(h,!1),i(await Dd(i(),a())),A(k,l(R),!0)}catch{A(h,!0)}finally{A(b,!1)}}function q(ae,ee){localStorage.setItem(ae,ee)}function F(ae){const ee=i().findIndex(fe=>fe.key===ae);i(i()[ee].manual=!0,!0),i(i()[ee].removed=!0,!0),i([...i()])}function Y(ae){if(!l(p))return;const ee=ae.offsetTop,fe=ee+ae.offsetHeight,Ae=l(p).scrollTop,De=Ae+l(p).clientHeight;ee>=Ae&&fe<=De||l(p).scrollTo({top:ee-l(p).clientHeight/2,behavior:"smooth"})}function K(ae){const ee=ae.target;A(g,ee.scrollTop,!0)}function M(){const ae={total:i().length,failed_automatic:i().filter(ee=>ee.failed&&!ee.manual).length,failed_manual:i().filter(ee=>ee.failed&&ee.manual).length,final_injected:l(U).length};pe(ve.TotalInjectionsCount,null,ae)}var N=x1();rd("7r3240",ae=>{var ee=c1();y(ae,ee)});let G;var J=x(N);{var Z=ae=>{var ee=d1(),fe=x(ee),Ae=x(fe);jg(Ae,{get element(){return l(p)},get height(){return v},onchange:te=>q(d,JSON.stringify(te))});var De=S(fe,2),Ke=x(De);Cg(Ke,{get element(){return l(p)},get position(){return u},limit:{x:16,y:16},onchange:te=>q(c,JSON.stringify(te))}),y(ae,ee)};B(J,ae=>{l(p)&&!n()&&ae(Z)})}var ne=S(J,2),de=x(ne);mt(de,ae=>ze==null?void 0:ze(ae));var Se=S(de,2);{var Ee=ae=>{var ee=u1();y(ae,ee)},$=ae=>{var ee=ye(),fe=Q(ee);{var Ae=De=>{var Ke=v1(),te=Q(Ke),ce=x(te),ke=S(te,2);Fa(ke,{onclick:()=>A(f,!0),size:"24px","aria-label":"Add manual injection",children:(tt,Be)=>{var fi=Qe("+");y(tt,fi)},$$slots:{default:!0}}),H(()=>{re(te,"aria-label",`${l(U).length??""} found playlinks`),X(ce,l(U).length)}),y(De,Ke)};B(fe,De=>{l(I)&&De(Ae)},!0)}y(ae,ee)};B(Se,ae=>{n()?ae(Ee):ae($,!1)})}var ie=S(ne,2);{var le=ae=>{var ee=b1(),fe=Q(ee);$g(fe,{get pageText(){return a()},onallow:()=>A(_,!0),ondisallow:()=>A(_,!1),get ontakeover(){return s()},onpoll:ce=>{r(ce.injectionsEnabled),o({...o(),aiEnabled:ce.aiEnabled})}});var Ae=S(fe,2);{var De=ce=>{{let ke=V(()=>ws(i()).aiInjections.length);s1(ce,mn(o,{get aiInjectionsCount(){return l(ke)}}))}};B(Ae,ce=>{l(_)&&(l(P)||!l(w))&&ce(De)})}var Ke=S(Ae,2);{var te=ce=>{var ke=y1(),tt=Q(ke);{var Be=it=>{var Je=f1(),ti=x(Je);Vi(ti,{type:"warning",children:(ii,Un)=>{var Xa=p1();y(ii,Xa)},$$slots:{default:!0}}),y(it,Je)};B(tt,it=>{r()||it(Be)})}var fi=S(tt,2);{var Ct=it=>{var Je=h1(),ti=x(Je);Vi(ti,{children:(ii,Un)=>{var Xa=Qe("Something went wrong, check your links below.");y(ii,Xa)},$$slots:{default:!0}}),Ie(7,Je,()=>Ba,()=>({duration:150})),y(it,Je)};B(fi,it=>{l(h)&&it(Ct)})}var ei=S(fi,2);je(ei,21,()=>l(D),it=>it.key,(it,Je)=>{const ti=V(()=>i().findIndex(ii=>ii.key===l(Je).key));Eg(it,{onremove:()=>F(l(Je).key),onhighlight:Y,get linkInjection(){return i()[l(ti)]},set linkInjection(ii){i(i()[l(ti)]=ii,!0)}})},it=>{var Je=g1();y(it,Je)});var Vn=S(ei,2);{var Ls=it=>{var Je=m1();Je.__click=j;var ti=x(Je);H(()=>{Je.disabled=l(b),X(ti,l(b)?"Saving...":"Save links")}),Ie(1,Je,()=>St,()=>({duration:100})),y(it,Je)};B(Vn,it=>{l(z)&&i().length&&l(_)&&it(Ls)})}y(ce,ke)};B(Ke,ce=>{l(I)&&ce(te)})}y(ae,ee)};B(ie,ae=>{n()||ae(le)})}var me=S(ie,2);{var Le=ae=>{var ee=_1();let fe;var Ae=x(ee);Kg(Ae,{get pageText(){return a()},onclose:()=>A(f,!1),onsave:De=>i().push(De)}),H(()=>fe=We(ee,"",fe,{top:`${l(g)??""}px`})),Ie(3,ee,()=>ua,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y(ae,ee)};B(me,ae=>{l(f)&&ae(Le)})}rt(N,ae=>A(p,ae),()=>l(p)),H(()=>G=_e(N,1,"editor playpilot-styled-scrollbar svelte-7r3240",null,G,{"panel-open":l(f),loading:n()})),ge("scroll",N,K),y(t,N),se()}xe(["click"]);var k1=Fe('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function S1(t){var e=k1();y(t,e)}var T1=T('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function E1(t,e){var i=T1(),a=x(i);a.__click=function(...s){var c;(c=e.onclick)==null||c.apply(this,s)};var n=x(a);S1(n);var r=S(a,2);r.__click=function(...s){var c;(c=e.onclose)==null||c.apply(this,s)};var o=x(r);Sn(o,{}),y(t,i)}xe(["click"]);function P1(t,e){oe(e,!0);const i=100;let a=1;n();function n(){if(window.PlayPilotLinkInjections.require_consent===!1){r();return}if(!window.__tcfapi){a<i&&setTimeout(n,100),a++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:d}=o;if(d!=="tcloaded"&&d!=="useractioncomplete")return;const u=v=>c.consents[v]===!0;Yd({ads:u(1),pixels:u(1)&&u(7),split_tests:u(9)&&u(10),tracking:u(7)&&u(8),affiliate:u(1)&&u(7)}),r()})}function r(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}se()}var C1=T('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),I1=T('<div class="item svelte-1tp7i1s"><span class="label"> </span>: <span class="data svelte-1tp7i1s"> </span></div>'),j1=T('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),z1=T('<button class="svelte-1tp7i1s"></button>'),A1=T("<small>You are using the beta version of TPI</small>"),L1=T('<button class="svelte-1tp7i1s">Use beta script</button>'),M1=T('<button class="svelte-1tp7i1s">Toggle new explore</button>'),q1=T("<option> </option>"),D1=T('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <!> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function R1(t,e){oe(e,!0);const i=["tpidebug","debugtpi"],a=[],n=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let r=W(Ue(d())),o=W(!1),s=null,c=W(184);Er(()=>{s&&clearInterval(s)});function d(){var R,I,z,U,D,P;const g=window.PlayPilotLinkInjections,k=((R=g.evaluated_link_injections)==null?void 0:R.filter(E=>!E.failed))||[],w=((I=g.evaluated_link_injections)==null?void 0:I.filter(E=>E.failed))||[],C=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:g.domain_sid},{label:"Organization",data:g.organization_sid},{label:"HTML selector",data:g.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([E,j])=>({label:E,data:j})),[`Succesful injections (${k.length})`]:k.map(E=>({label:E.title,data:E.sentence})),[`Failed injections (${w.length})`]:w.map(E=>({label:E.title,data:`Reason: ${E.failed_message} | Sentence: ${E.sentence}`})),[`Fetched ads (${((z=g.ads)==null?void 0:z.length)||0})`]:(U=g.ads)==null?void 0:U.map(E=>({label:E.campaign_name,data:E})),[`Tracking events (${((D=g.tracked_events)==null?void 0:D.length)||0})`]:(P=g.tracked_events)==null?void 0:P.map(E=>({label:E.event,data:E.payload})),[`Visible pixels (${C.length})`]:C.map((E,j)=>({label:j+1,data:E.src}))}}function u(g){l(o)||(a.push(g.key),A(o,i.some(k=>a.slice(a.length-k.length,a.length).join("")===k),!0),s=setInterval(()=>A(r,d(),!0),200))}function v(g){window.PlayPilotLinkInjections.ads.unshift({campaign_format:g,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function p(g){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values(Qr).forEach(({key:k,numberOfVariants:w})=>{const C=1/w;window.PlayPilotLinkInjections.split_test_identifiers[k]=Math.min(C*g,1)})}function f(){var w,C;const g=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!g)return;(C=(w=window.PlayPilotLinkInjections)==null?void 0:w.destroy)==null||C.call(w);const k=document.createElement("script");for(const R of g.attributes)k.setAttribute(R.name,R.value);k.getAttribute("onload")||k.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),k.src=g.src.replace("link-injection","link-injection@next"),g.insertAdjacentElement("afterend",k),g.remove()}var b=ye();ge("keydown",Pe,u);var h=Q(b);{var _=g=>{var k=D1(),w=S(x(k),4);{var C=$=>{var ie=C1();y($,ie)};B(w,$=>{var ie,le,me;(ie=window.PlayPilotLinkInjections.config)!=null&&ie.exclude_urls_pattern&&Oi().match((me=(le=window.PlayPilotLinkInjections)==null?void 0:le.config)==null?void 0:me.exclude_urls_pattern)&&$(C)})}var R=S(w,2);je(R,17,()=>Object.entries(l(r)),qe,($,ie)=>{var le=V(()=>ka(l(ie),2));let me=()=>l(le)[0],Le=()=>l(le)[1];var ae=j1(),ee=x(ae),fe=x(ee),Ae=S(ee,2);{var De=te=>{var ce=ye(),ke=Q(ce);{var tt=Be=>{var fi=ye(),Ct=Q(fi);je(Ct,17,Le,qe,(ei,Vn,Ls,it)=>{let Je=()=>l(Vn).label,ti=()=>l(Vn).data;var ii=I1(),Un=x(ii),Xa=x(Un),U1=S(Un,2),W1=x(U1);H(G1=>{X(Xa,Je()),X(W1,G1)},[()=>JSON.stringify(ti())]),y(ei,ii)}),y(Be,fi)};B(ke,Be=>{Array.isArray(Le())&&Be(tt)})}y(te,ce)},Ke=te=>{var ce=Qe("No data");y(te,ce)};B(Ae,te=>{var ce;(ce=Le())!=null&&ce.length?te(De):te(Ke,!1)})}H(()=>X(fe,me())),y($,ae)});var I=S(R,4);I.__click=()=>v("card");var z=S(I,2);z.__click=()=>v("top_scroll");var U=S(z,6);je(U,16,()=>({length:4}),qe,($,ie,le)=>{var me=z1();me.__click=()=>p(le),me.textContent=le,y($,me)});var D=S(U,4);D.__click=()=>console.log(Lr(window.PlayPilotLinkInjections.config));var P=S(D,2);P.__click=()=>console.log(Lr(window.PlayPilotLinkInjections.config).pageText);var E=S(P,4);E.__click=function(...$){var ie;(ie=e.onrerender)==null||ie.apply(this,$)};var j=S(E,2);{var q=$=>{var ie=A1();y($,ie)},F=$=>{var ie=L1();ie.__click=f,y($,ie)};B(j,$=>{n?$(q):$(F,!1)})}var Y=S(j,2);{var K=$=>{var ie=M1();ie.__click=()=>{zn(),window.PlayPilotLinkInjections.config.explore_use_router=!fa(),jn()},y($,ie)};B(Y,$=>{fa()||$(K)})}var M=S(Y,4),N=S(x(M),2);ud(N,window.PlayPilotLinkInjections.region),N.__change=$=>{zn(),window.PlayPilotLinkInjections.region=$.target.value,jn()};var G=S(M,2),J=S(x(G),2);J.__change=$=>{zn(),window.PlayPilotLinkInjections.language=$.target.value,jn()},je(J,21,()=>Object.entries(m),qe,($,ie)=>{var le=V(()=>ka(l(ie),2));let me=()=>l(le)[0],Le=()=>l(le)[1];var ae=q1(),ee=x(ae),fe={};H(Ae=>{Eo(ae,Ae),X(ee,me()),fe!==(fe=Le())&&(ae.value=(ae.__value=Le())??"")},[()=>Le()===Ra()]),y($,ae)});var Z=S(G,4),ne=S(x(Z),2);re(ne,"min",80),re(ne,"max",240),re(ne,"step",8),ne.__input=()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`);var de=S(ne,2),Se=x(de),Ee=S(Z,4);Ee.__click=()=>A(o,!1),H(()=>X(Se,l(c))),ca(ne,()=>l(c),$=>A(c,$)),y(g,k)};B(h,g=>{l(o)&&g(_)})}y(t,b),se()}xe(["click","change","input"]);function N1(t,e){oe(e,!1);const i=Array.from(document.querySelectorAll(vi)),a=[],n=Date.now();let r=!1,o=null;$e(()=>{yn()||s()});function s(){o=new IntersectionObserver(c),i.forEach(v=>{o.observe(v)})}function c(v){v.forEach(p=>{if(!p.isIntersecting)return;const f=p.target.getAttribute(wi);f&&a.push(f),o.unobserve(p.target)})}function d(){const{scrollHeight:v,scrollTop:p,clientHeight:f}=document.documentElement;return p/(v-f)*100}function u(){var p,f;if(r||document.visibilityState!=="hidden")return;r=!0;const v=Date.now();pe(ve.UserLeft,null,{time_start:n,time_end:v,time_spent:v-n,existing_injections_count:i.length,shown_injections_count:a.length,fired_events:((f=(p=window.PlayPilotLinkInjections)==null?void 0:p.tracked_events)==null?void 0:f.map(b=>b.event))||[],scroll_percentage:d()})}Tr(),ge("visibilitychange",Pe,u),se()}function O1(t,e){oe(e,!0);const i=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),a=new An,n=.7,r="[data-playpilot-poster]";let o=W(0),s={},c=null;const d=V(()=>l(o)<Ni);Er(f);function u(){var w,C;if((C=(w=window.PlayPilotLinkInjections)==null?void 0:w.config)!=null&&C.disable_scroll_reveal_posters||!l(d))return;b();const h=window.innerHeight,_=new An,g=h*n,k=h-g;for(const R of i){const{top:I}=R.getBoundingClientRect();I<g&&I>k&&_.add(R)}for(const R of _){if(a.has(R))continue;const I=R.dataset.playpilotPosterUrl;I in s&&s[I]!==R||(v(R,I),a.add(R),s[I]=R)}}function v(h,_){const g=document.createElement("img");g.classList.add("playpilot-floating-poster"),g.dataset.playpilotPoster="",g.src=_,g.alt="",g.onload=()=>g.classList.add("loaded"),h.insertAdjacentElement("afterbegin",g)}function p(h){const _=h.querySelector(r);_&&(_.classList.add("animating-out"),setTimeout(()=>_.remove(),500))}function f(){for(const h of Array.from(document.querySelectorAll(r)))h.remove()}function b(){c&&clearTimeout(c),c=setTimeout(()=>{for(const h of a)p(h),a.delete(h),s={}},1e3)}ge("scroll",Pe,u),Sr("innerWidth",h=>A(o,h,!0)),se()}var B1=T("<!> <!>",1),F1=T("<!> <!>",1),H1=T('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!>',1);function V1(t,e){oe(e,!0);let i=W(Ue([])),a=W(null),n=W(Ue(yn())),r=W(!!jr()),o=W(!1),s=W(!0),c=W(!0),d=W(Ue([]));const u=V(()=>l(a)||{}),v=V(()=>$a(l(u).ai_injections,()=>[],!0)),p=V(()=>$a(l(u).manual_injections,()=>[],!0)),f=V(()=>Ar(l(i))),b=_();Ye(()=>{l(n)&&!l(s)&&g()}),jn(),Er(il);async function h(){xn()||(await b,eu(),pe(ve.ArticlePageView),!(!l(v).length&&!l(p).length)&&(window.PlayPilotLinkInjections.no_affiliate||(window.PlayPilotLinkInjections.ads=await es())))}async function _(){var K;A(s,!0);try{l(n)&&A(o,await No({throwError:!0}),!0)}catch{pe(ve.AuthFailed)}try{const M=window.PlayPilotLinkInjections.config||await Qh()||{};if(window.PlayPilotLinkInjections.config=M,M!=null&&M.custom_style&&R(M.custom_style||""),M!=null&&M.explore_navigation_selector&&tp(),M!=null&&M.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),M!=null&&M.domain_sid&&Qo({organizationSid:M.organization_sid,domainSid:M.domain_sid}),A(c,Md(M),!0),l(c))return;M!=null&&M.html_selector&&(window.PlayPilotLinkInjections.selector=M==null?void 0:M.html_selector),A(i,Lr(window.PlayPilotLinkInjections.config).elements,!0)}catch(M){pe(ve.FetchingConfigFailed),console.error("TPI Config failed to fetch",M);return}try{if(A(a,await window.PlayPilotLinkInjections.initial_link_injections_promise||null,!0),A(a,l(a)||await Fo(l(f),{maxTries:1,runAiWhenRelevant:!xn()}),!0),A(s,!1),!l(a)||(K=window.PlayPilotLinkInjections.config)!=null&&K.disable_public_injections&&!(l(n)&&l(o)))return;if(Qo({organizationSid:l(a).organization_sid,domainSid:l(a).domain_sid}),!l(a).ai_running||!l(a).ai_enabled){w({aiInjections:l(v),manualInjections:l(p)});return}if(!l(n)||xn())return;A(a,await Fo(l(f),{requireCompletedResult:!0,onpoll:M=>A(a,M,!0)}),!0),w({aiInjections:l(v),manualInjections:l(p)})}catch(M){console.error(M),pe(ve.InjectionError,null,{message:M.message})}}function g(){w(ws(l(d)))}function k(){A(n,!1),requestAnimationFrame(()=>{A(n,!0),_()})}function w(K={aiInjections:l(v),manualInjections:l(p)}){const M=Bh(l(i),K);JSON.stringify(M)!==JSON.stringify(l(d))&&(A(d,M,!0),window.PlayPilotLinkInjections.evaluated_link_injections=M),l(n)||I(M)}function C(){A(n,!0),Cd(),_()}function R(K){const M="playpilot-custom-style",N=document.getElementById(M),G=N||document.createElement("style");G.textContent=`body { ${K} }`,G.id=M,N||document.body.appendChild(G)}function I(K){const M=K.filter(G=>!G.failed),N=K.filter(G=>G.failed);if(M.length&&pe(ve.ArticleInjected,null,{manual:M.filter(G=>G.manual).length,ai:M.filter(G=>!G.manual).length}),N.length){const G=J=>N.filter(({failed_message:Z})=>Z==null?void 0:Z.includes(J)).length;pe(ve.FailedInjectionsCount,null,{total:N.length,sentence_not_found:G("sentence was not found"),already_linked:G("already inside of a link"),broken_html:G("broken HTML"),duplicate:G("duplicate"),unknown:G("unknown reasons")})}}var z=H1(),U=Q(z),D=x(U);{var P=K=>{var M=B1(),N=Q(M);{var G=ne=>{E1(ne,{onclick:C,onclose:()=>{A(r,!1),Pd()}})};B(N,ne=>{!l(c)&&l(r)&&!l(n)&&ne(G)})}var J=S(N,2);{var Z=ne=>{var de=ye(),Se=Q(de);ql(Se,{onerror:$=>pe(ve.EditorError,null,{message:$.message}),failed:$=>{Vi($,{fixed:!0,children:(ie,le)=>{var me=Qe("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(ie,me)},$$slots:{default:!0}})}},$=>{{let ie=V(()=>{var me;return(me=l(a))==null?void 0:me.injections_enabled}),le=V(()=>{var me,Le,ae,ee,fe;return{aiEnabled:(me=l(a))==null?void 0:me.ai_enabled,aiRunning:((Le=l(a))==null?void 0:Le.ai_running)&&((ae=l(a))==null?void 0:ae.ai_enabled),message:(ee=l(a))==null?void 0:ee.ai_progress_message,percentage:(fe=l(a))==null?void 0:fe.ai_progress_percentage}});w1($,{get pageText(){return l(f)},get loading(){return l(s)},onreinitialize:k,get injectionsEnabled(){return l(ie)},get aiStatus(){return l(le)},get linkInjections(){return l(d)},set linkInjections(me){A(d,me,!0)}})}}),y(ne,de)};B(J,ne=>{!l(c)&&l(n)&&l(o)&&ne(Z)})}y(K,M)};B(D,K=>{K(P)})}var E=S(D,2);R1(E,{onrerender:g});var j=S(U,2);{var q=K=>{Gr(K,{get pixels(){return l(a).pixels}})};B(j,K=>{var M,N;(N=(M=l(a))==null?void 0:M.pixels)!=null&&N.length&&K(q)})}var F=S(j,2);Ri(F,()=>l(d),K=>{var M=F1(),N=Q(M);N1(N,{});var G=S(N,2);O1(G,{}),y(K,M)});var Y=S(F,2);P1(Y,{onchange:h}),y(t,z),se()}window.PlayPilotMount={mount(){window.PlayPilotLinkInjections.app&&this.destroy();const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Lt(V1,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),il()}}})();
|
|
12
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),f1=T('<div class="alert svelte-7r3240"><!></div>'),h1=T('<div class="error svelte-7r3240"><!></div>'),g1=T('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),m1=T('<button class="save svelte-7r3240"> </button>'),y1=T('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),b1=T("<!> <!> <!>",1),_1=T('<div class="panel playpilot-styled-scrollbar svelte-7r3240"><!></div>'),x1=T('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function w1(t,e){oe(e,!0);let i=L(e,"linkInjections",15),a=L(e,"pageText",3,""),n=L(e,"loading",3,!1),r=L(e,"injectionsEnabled",7,!1),o=L(e,"aiStatus",23,()=>({})),s=L(e,"onreinitialize",3,()=>null);const c="editor-position",d="editor-height",u=JSON.parse(localStorage.getItem(c)||'{ "x": 0, "y": 0 }'),v=parseInt(localStorage.getItem(d)||"0");let p=W(null),f=W(!1),b=W(!1),h=W(!1),_=W(!0),g=W(0),k=W("");const w=V(()=>$a(o().aiEnabled,!1)),C=V(()=>$a(o().aiRunning,!1)),R=V(()=>JSON.stringify(i())),I=V(()=>!l(C)&&l(_)),z=V(()=>l(k)&&l(k)!==l(R)),U=V(()=>i().filter(ae=>ae.title_details&&!ae.removed&&!ae.duplicate&&(ae.manual||!ae.manual&&!ae.failed))),D=V(()=>E(l(U))),P=V(()=>!n()&&wt(()=>o().aiRunning));Ye(()=>{n()||wt(()=>{requestAnimationFrame(()=>A(k,l(R),!0)),M()})});function E(ae){return ae.sort((ee,fe)=>ee.failed!==fe.failed?ee.failed?1:-1:ee.title_details.title.localeCompare(fe.title_details.title))}async function j(){try{A(b,!0),A(h,!1),i(await Dd(i(),a())),A(k,l(R),!0)}catch{A(h,!0)}finally{A(b,!1)}}function q(ae,ee){localStorage.setItem(ae,ee)}function F(ae){const ee=i().findIndex(fe=>fe.key===ae);i(i()[ee].manual=!0,!0),i(i()[ee].removed=!0,!0),i([...i()])}function Y(ae){if(!l(p))return;const ee=ae.offsetTop,fe=ee+ae.offsetHeight,Ae=l(p).scrollTop,De=Ae+l(p).clientHeight;ee>=Ae&&fe<=De||l(p).scrollTo({top:ee-l(p).clientHeight/2,behavior:"smooth"})}function K(ae){const ee=ae.target;A(g,ee.scrollTop,!0)}function M(){const ae={total:i().length,failed_automatic:i().filter(ee=>ee.failed&&!ee.manual).length,failed_manual:i().filter(ee=>ee.failed&&ee.manual).length,final_injected:l(U).length};pe(ve.TotalInjectionsCount,null,ae)}var N=x1();rd("7r3240",ae=>{var ee=c1();y(ae,ee)});let G;var J=x(N);{var Z=ae=>{var ee=d1(),fe=x(ee),Ae=x(fe);jg(Ae,{get element(){return l(p)},get height(){return v},onchange:te=>q(d,JSON.stringify(te))});var De=S(fe,2),Ke=x(De);Cg(Ke,{get element(){return l(p)},get position(){return u},limit:{x:16,y:16},onchange:te=>q(c,JSON.stringify(te))}),y(ae,ee)};B(J,ae=>{l(p)&&!n()&&ae(Z)})}var ne=S(J,2),de=x(ne);mt(de,ae=>ze==null?void 0:ze(ae));var Se=S(de,2);{var Ee=ae=>{var ee=u1();y(ae,ee)},$=ae=>{var ee=ye(),fe=Q(ee);{var Ae=De=>{var Ke=v1(),te=Q(Ke),ce=x(te),ke=S(te,2);Fa(ke,{onclick:()=>A(f,!0),size:"24px","aria-label":"Add manual injection",children:(tt,Be)=>{var fi=Qe("+");y(tt,fi)},$$slots:{default:!0}}),H(()=>{re(te,"aria-label",`${l(U).length??""} found playlinks`),X(ce,l(U).length)}),y(De,Ke)};B(fe,De=>{l(I)&&De(Ae)},!0)}y(ae,ee)};B(Se,ae=>{n()?ae(Ee):ae($,!1)})}var ie=S(ne,2);{var le=ae=>{var ee=b1(),fe=Q(ee);$g(fe,{get pageText(){return a()},onallow:()=>A(_,!0),ondisallow:()=>A(_,!1),get ontakeover(){return s()},onpoll:ce=>{r(ce.injectionsEnabled),o({...o(),aiEnabled:ce.aiEnabled})}});var Ae=S(fe,2);{var De=ce=>{{let ke=V(()=>ws(i()).aiInjections.length);s1(ce,mn(o,{get aiInjectionsCount(){return l(ke)}}))}};B(Ae,ce=>{l(_)&&(l(P)||!l(w))&&ce(De)})}var Ke=S(Ae,2);{var te=ce=>{var ke=y1(),tt=Q(ke);{var Be=it=>{var Je=f1(),ti=x(Je);Vi(ti,{type:"warning",children:(ii,Un)=>{var Xa=p1();y(ii,Xa)},$$slots:{default:!0}}),y(it,Je)};B(tt,it=>{r()||it(Be)})}var fi=S(tt,2);{var Ct=it=>{var Je=h1(),ti=x(Je);Vi(ti,{children:(ii,Un)=>{var Xa=Qe("Something went wrong, check your links below.");y(ii,Xa)},$$slots:{default:!0}}),Ie(7,Je,()=>Ba,()=>({duration:150})),y(it,Je)};B(fi,it=>{l(h)&&it(Ct)})}var ei=S(fi,2);je(ei,21,()=>l(D),it=>it.key,(it,Je)=>{const ti=V(()=>i().findIndex(ii=>ii.key===l(Je).key));Eg(it,{onremove:()=>F(l(Je).key),onhighlight:Y,get linkInjection(){return i()[l(ti)]},set linkInjection(ii){i(i()[l(ti)]=ii,!0)}})},it=>{var Je=g1();y(it,Je)});var Vn=S(ei,2);{var Ls=it=>{var Je=m1();Je.__click=j;var ti=x(Je);H(()=>{Je.disabled=l(b),X(ti,l(b)?"Saving...":"Save links")}),Ie(1,Je,()=>St,()=>({duration:100})),y(it,Je)};B(Vn,it=>{l(z)&&i().length&&l(_)&&it(Ls)})}y(ce,ke)};B(Ke,ce=>{l(I)&&ce(te)})}y(ae,ee)};B(ie,ae=>{n()||ae(le)})}var me=S(ie,2);{var Le=ae=>{var ee=_1();let fe;var Ae=x(ee);Kg(Ae,{get pageText(){return a()},onclose:()=>A(f,!1),onsave:De=>i().push(De)}),H(()=>fe=We(ee,"",fe,{top:`${l(g)??""}px`})),Ie(3,ee,()=>ua,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y(ae,ee)};B(me,ae=>{l(f)&&ae(Le)})}rt(N,ae=>A(p,ae),()=>l(p)),H(()=>G=_e(N,1,"editor playpilot-styled-scrollbar svelte-7r3240",null,G,{"panel-open":l(f),loading:n()})),ge("scroll",N,K),y(t,N),se()}xe(["click"]);var k1=Fe('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function S1(t){var e=k1();y(t,e)}var T1=T('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function E1(t,e){var i=T1(),a=x(i);a.__click=function(...s){var c;(c=e.onclick)==null||c.apply(this,s)};var n=x(a);S1(n);var r=S(a,2);r.__click=function(...s){var c;(c=e.onclose)==null||c.apply(this,s)};var o=x(r);Sn(o,{}),y(t,i)}xe(["click"]);function P1(t,e){oe(e,!0);const i=100;let a=1;n();function n(){if(window.PlayPilotLinkInjections.require_consent===!1){r();return}if(!window.__tcfapi){a<i&&setTimeout(n,100),a++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:d}=o;if(d!=="tcloaded"&&d!=="useractioncomplete")return;const u=v=>c.consents[v]===!0;Yd({ads:u(1),pixels:u(1)&&u(7),split_tests:u(9)&&u(10),tracking:u(7)&&u(8),affiliate:u(1)&&u(7)}),r()})}function r(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}se()}var C1=T('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),I1=T('<div class="item svelte-1tp7i1s"><span class="label"> </span>: <span class="data svelte-1tp7i1s"> </span></div>'),j1=T('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),z1=T('<button class="svelte-1tp7i1s"></button>'),A1=T("<small>You are using the beta version of TPI</small>"),L1=T('<button class="svelte-1tp7i1s">Use beta script</button>'),M1=T('<button class="svelte-1tp7i1s">Toggle new explore</button>'),q1=T("<option> </option>"),D1=T('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <!> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function R1(t,e){oe(e,!0);const i=["tpidebug","debugtpi"],a=[],n=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let r=W(Ue(d())),o=W(!1),s=null,c=W(184);Er(()=>{s&&clearInterval(s)});function d(){var R,I,z,U,D,P;const g=window.PlayPilotLinkInjections,k=((R=g.evaluated_link_injections)==null?void 0:R.filter(E=>!E.failed))||[],w=((I=g.evaluated_link_injections)==null?void 0:I.filter(E=>E.failed))||[],C=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:g.domain_sid},{label:"Organization",data:g.organization_sid},{label:"HTML selector",data:g.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([E,j])=>({label:E,data:j})),[`Succesful injections (${k.length})`]:k.map(E=>({label:E.title,data:E.sentence})),[`Failed injections (${w.length})`]:w.map(E=>({label:E.title,data:`Reason: ${E.failed_message} | Sentence: ${E.sentence}`})),[`Fetched ads (${((z=g.ads)==null?void 0:z.length)||0})`]:(U=g.ads)==null?void 0:U.map(E=>({label:E.campaign_name,data:E})),[`Tracking events (${((D=g.tracked_events)==null?void 0:D.length)||0})`]:(P=g.tracked_events)==null?void 0:P.map(E=>({label:E.event,data:E.payload})),[`Visible pixels (${C.length})`]:C.map((E,j)=>({label:j+1,data:E.src}))}}function u(g){l(o)||(a.push(g.key),A(o,i.some(k=>a.slice(a.length-k.length,a.length).join("")===k),!0),s=setInterval(()=>A(r,d(),!0),200))}function v(g){window.PlayPilotLinkInjections.ads.unshift({campaign_format:g,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function p(g){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values(Qr).forEach(({key:k,numberOfVariants:w})=>{const C=1/w;window.PlayPilotLinkInjections.split_test_identifiers[k]=Math.min(C*g,1)})}function f(){var w,C;const g=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!g)return;(C=(w=window.PlayPilotLinkInjections)==null?void 0:w.destroy)==null||C.call(w);const k=document.createElement("script");for(const R of g.attributes)k.setAttribute(R.name,R.value);k.getAttribute("onload")||k.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),k.src=g.src.replace("link-injection","link-injection@next"),g.insertAdjacentElement("afterend",k),g.remove()}var b=ye();ge("keydown",Pe,u);var h=Q(b);{var _=g=>{var k=D1(),w=S(x(k),4);{var C=$=>{var ie=C1();y($,ie)};B(w,$=>{var ie,le,me;(ie=window.PlayPilotLinkInjections.config)!=null&&ie.exclude_urls_pattern&&Oi().match((me=(le=window.PlayPilotLinkInjections)==null?void 0:le.config)==null?void 0:me.exclude_urls_pattern)&&$(C)})}var R=S(w,2);je(R,17,()=>Object.entries(l(r)),qe,($,ie)=>{var le=V(()=>ka(l(ie),2));let me=()=>l(le)[0],Le=()=>l(le)[1];var ae=j1(),ee=x(ae),fe=x(ee),Ae=S(ee,2);{var De=te=>{var ce=ye(),ke=Q(ce);{var tt=Be=>{var fi=ye(),Ct=Q(fi);je(Ct,17,Le,qe,(ei,Vn,Ls,it)=>{let Je=()=>l(Vn).label,ti=()=>l(Vn).data;var ii=I1(),Un=x(ii),Xa=x(Un),U1=S(Un,2),W1=x(U1);H(G1=>{X(Xa,Je()),X(W1,G1)},[()=>JSON.stringify(ti())]),y(ei,ii)}),y(Be,fi)};B(ke,Be=>{Array.isArray(Le())&&Be(tt)})}y(te,ce)},Ke=te=>{var ce=Qe("No data");y(te,ce)};B(Ae,te=>{var ce;(ce=Le())!=null&&ce.length?te(De):te(Ke,!1)})}H(()=>X(fe,me())),y($,ae)});var I=S(R,4);I.__click=()=>v("card");var z=S(I,2);z.__click=()=>v("top_scroll");var U=S(z,6);je(U,16,()=>({length:4}),qe,($,ie,le)=>{var me=z1();me.__click=()=>p(le),me.textContent=le,y($,me)});var D=S(U,4);D.__click=()=>console.log(Lr(window.PlayPilotLinkInjections.config));var P=S(D,2);P.__click=()=>console.log(Lr(window.PlayPilotLinkInjections.config).pageText);var E=S(P,4);E.__click=function(...$){var ie;(ie=e.onrerender)==null||ie.apply(this,$)};var j=S(E,2);{var q=$=>{var ie=A1();y($,ie)},F=$=>{var ie=L1();ie.__click=f,y($,ie)};B(j,$=>{n?$(q):$(F,!1)})}var Y=S(j,2);{var K=$=>{var ie=M1();ie.__click=()=>{zn(),window.PlayPilotLinkInjections.config.explore_use_router=!fa(),jn()},y($,ie)};B(Y,$=>{fa()||$(K)})}var M=S(Y,4),N=S(x(M),2);ud(N,window.PlayPilotLinkInjections.region),N.__change=$=>{zn(),window.PlayPilotLinkInjections.region=$.target.value,jn()};var G=S(M,2),J=S(x(G),2);J.__change=$=>{zn(),window.PlayPilotLinkInjections.language=$.target.value,jn()},je(J,21,()=>Object.entries(m),qe,($,ie)=>{var le=V(()=>ka(l(ie),2));let me=()=>l(le)[0],Le=()=>l(le)[1];var ae=q1(),ee=x(ae),fe={};H(Ae=>{Eo(ae,Ae),X(ee,me()),fe!==(fe=Le())&&(ae.value=(ae.__value=Le())??"")},[()=>Le()===Ra()]),y($,ae)});var Z=S(G,4),ne=S(x(Z),2);re(ne,"min",80),re(ne,"max",240),re(ne,"step",8),ne.__input=()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`);var de=S(ne,2),Se=x(de),Ee=S(Z,4);Ee.__click=()=>A(o,!1),H(()=>X(Se,l(c))),ca(ne,()=>l(c),$=>A(c,$)),y(g,k)};B(h,g=>{l(o)&&g(_)})}y(t,b),se()}xe(["click","change","input"]);function N1(t,e){oe(e,!1);const i=Array.from(document.querySelectorAll(vi)),a=[],n=Date.now();let r=!1,o=null;$e(()=>{yn()||s()});function s(){o=new IntersectionObserver(c),i.forEach(v=>{o.observe(v)})}function c(v){v.forEach(p=>{if(!p.isIntersecting)return;const f=p.target.getAttribute(wi);f&&a.push(f),o.unobserve(p.target)})}function d(){const{scrollHeight:v,scrollTop:p,clientHeight:f}=document.documentElement;return p/(v-f)*100}function u(){var p,f;if(r||document.visibilityState!=="hidden")return;r=!0;const v=Date.now();pe(ve.UserLeft,null,{time_start:n,time_end:v,time_spent:v-n,existing_injections_count:i.length,shown_injections_count:a.length,fired_events:((f=(p=window.PlayPilotLinkInjections)==null?void 0:p.tracked_events)==null?void 0:f.map(b=>b.event))||[],scroll_percentage:d()})}Tr(),ge("visibilitychange",Pe,u),se()}function O1(t,e){oe(e,!0);const i=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),a=new An,n=.7,r="[data-playpilot-poster]";let o=W(0),s={},c=null;const d=V(()=>l(o)<Ni);Er(f);function u(){var w,C;if((C=(w=window.PlayPilotLinkInjections)==null?void 0:w.config)!=null&&C.disable_scroll_reveal_posters||!l(d))return;b();const h=window.innerHeight,_=new An,g=h*n,k=h-g;for(const R of i){const{top:I}=R.getBoundingClientRect();I<g&&I>k&&_.add(R)}for(const R of _){if(a.has(R))continue;const I=R.dataset.playpilotPosterUrl;I in s&&s[I]!==R||(v(R,I),a.add(R),s[I]=R)}}function v(h,_){const g=document.createElement("img");g.classList.add("playpilot-floating-poster"),g.dataset.playpilotPoster="",g.src=_,g.alt="",g.onload=()=>g.classList.add("loaded"),h.insertAdjacentElement("afterbegin",g)}function p(h){const _=h.querySelector(r);_&&(_.classList.add("animating-out"),setTimeout(()=>_.remove(),500))}function f(){for(const h of Array.from(document.querySelectorAll(r)))h.remove()}function b(){c&&clearTimeout(c),c=setTimeout(()=>{for(const h of a)p(h),a.delete(h),s={}},1e3)}ge("scroll",Pe,u),Sr("innerWidth",h=>A(o,h,!0)),se()}var B1=T("<!> <!>",1),F1=T("<!> <!>",1),H1=T('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!>',1);function V1(t,e){oe(e,!0);let i=W(Ue([])),a=W(null),n=W(Ue(yn())),r=W(!!jr()),o=W(!1),s=W(!0),c=W(!0),d=W(Ue([]));const u=V(()=>l(a)||{}),v=V(()=>$a(l(u).ai_injections,()=>[],!0)),p=V(()=>$a(l(u).manual_injections,()=>[],!0)),f=V(()=>Ar(l(i))),b=_();Ye(()=>{l(n)&&!l(s)&&g()}),jn(),Er(il);async function h(){xn()||(await b,eu(),pe(ve.ArticlePageView),!(!l(v).length&&!l(p).length)&&(window.PlayPilotLinkInjections.no_affiliate||(window.PlayPilotLinkInjections.ads=await es())))}async function _(){var K;A(s,!0);try{l(n)&&A(o,await No({throwError:!0}),!0)}catch{pe(ve.AuthFailed)}try{const M=window.PlayPilotLinkInjections.config||await Qh()||{};if(window.PlayPilotLinkInjections.config=M,M!=null&&M.custom_style&&R(M.custom_style||""),M!=null&&M.explore_navigation_selector&&tp(),M!=null&&M.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),M!=null&&M.domain_sid&&Qo({organizationSid:M.organization_sid,domainSid:M.domain_sid}),A(c,Md(M),!0),l(c))return;M!=null&&M.html_selector&&(window.PlayPilotLinkInjections.selector=M==null?void 0:M.html_selector),A(i,Lr(window.PlayPilotLinkInjections.config).elements,!0)}catch(M){pe(ve.FetchingConfigFailed),console.error("TPI Config failed to fetch",M);return}try{if(A(a,await window.PlayPilotLinkInjections.initial_link_injections_promise||null,!0),A(a,l(a)||await Fo(l(f),{maxTries:1,runAiWhenRelevant:!xn()}),!0),A(s,!1),!l(a)||(K=window.PlayPilotLinkInjections.config)!=null&&K.disable_public_injections&&!(l(n)&&l(o)))return;if(Qo({organizationSid:l(a).organization_sid,domainSid:l(a).domain_sid}),!l(a).ai_running||!l(a).ai_enabled){w({aiInjections:l(v),manualInjections:l(p)});return}if(!l(n)||xn())return;A(a,await Fo(l(f),{requireCompletedResult:!0,onpoll:M=>A(a,M,!0)}),!0),w({aiInjections:l(v),manualInjections:l(p)})}catch(M){console.error(M),pe(ve.InjectionError,null,{message:M.message})}}function g(){w(ws(l(d)))}function k(){A(n,!1),requestAnimationFrame(()=>{A(n,!0),_()})}function w(K={aiInjections:l(v),manualInjections:l(p)}){const M=Bh(l(i),K);JSON.stringify(M)!==JSON.stringify(l(d))&&(A(d,M,!0),window.PlayPilotLinkInjections.evaluated_link_injections=M),l(n)||I(M)}function C(){A(n,!0),Cd(),_()}function R(K){const M="playpilot-custom-style",N=document.getElementById(M),G=N||document.createElement("style");G.textContent=`body { ${K} }`,G.id=M,N||document.body.appendChild(G)}function I(K){const M=K.filter(G=>!G.failed),N=K.filter(G=>G.failed);if(M.length&&pe(ve.ArticleInjected,null,{manual:M.filter(G=>G.manual).length,ai:M.filter(G=>!G.manual).length}),N.length){const G=J=>N.filter(({failed_message:Z})=>Z==null?void 0:Z.includes(J)).length;pe(ve.FailedInjectionsCount,null,{total:N.length,sentence_not_found:G("sentence was not found"),already_linked:G("already inside of a link"),broken_html:G("broken HTML"),duplicate:G("duplicate"),unknown:G("unknown reasons")})}}var z=H1(),U=Q(z),D=x(U);{var P=K=>{var M=B1(),N=Q(M);{var G=ne=>{E1(ne,{onclick:C,onclose:()=>{A(r,!1),Pd()}})};B(N,ne=>{!l(c)&&l(r)&&!l(n)&&ne(G)})}var J=S(N,2);{var Z=ne=>{var de=ye(),Se=Q(de);ql(Se,{onerror:$=>pe(ve.EditorError,null,{message:$.message}),failed:$=>{Vi($,{fixed:!0,children:(ie,le)=>{var me=Qe("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(ie,me)},$$slots:{default:!0}})}},$=>{{let ie=V(()=>{var me;return(me=l(a))==null?void 0:me.injections_enabled}),le=V(()=>{var me,Le,ae,ee,fe;return{aiEnabled:(me=l(a))==null?void 0:me.ai_enabled,aiRunning:((Le=l(a))==null?void 0:Le.ai_running)&&((ae=l(a))==null?void 0:ae.ai_enabled),message:(ee=l(a))==null?void 0:ee.ai_progress_message,percentage:(fe=l(a))==null?void 0:fe.ai_progress_percentage}});w1($,{get pageText(){return l(f)},get loading(){return l(s)},onreinitialize:k,get injectionsEnabled(){return l(ie)},get aiStatus(){return l(le)},get linkInjections(){return l(d)},set linkInjections(me){A(d,me,!0)}})}}),y(ne,de)};B(J,ne=>{!l(c)&&l(n)&&l(o)&&ne(Z)})}y(K,M)};B(D,K=>{K(P)})}var E=S(D,2);R1(E,{onrerender:g});var j=S(U,2);{var q=K=>{Gr(K,{get pixels(){return l(a).pixels}})};B(j,K=>{var M,N;(N=(M=l(a))==null?void 0:M.pixels)!=null&&N.length&&K(q)})}var F=S(j,2);Ri(F,()=>l(d),K=>{var M=F1(),N=Q(M);N1(N,{});var G=S(N,2);O1(G,{}),y(K,M)});var Y=S(F,2);P1(Y,{onchange:h}),y(t,z),se()}window.PlayPilotMount={mount(){if(window.PlayPilotLinkInjections.app)return;const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Lt(V1,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),il()}}})();
|