@banou/stub 0.0.20 → 0.0.21

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.
Files changed (67) hide show
  1. package/build/.well-known/fkn.json +1 -1
  2. package/build/assets/embed-VjpeLPHx.js +1461 -0
  3. package/build/assets/index-Cq0deG16.js +1964 -0
  4. package/build/assets/lib-DHuurgWT.js +71 -0
  5. package/build/assets/{lib-account-BuVN6Bsx.js → lib-account-B_rZrj_U.js} +1 -1
  6. package/build/assets/lib-account-ZA7I4UZl.js +2 -0
  7. package/build/assets/lib-api-0oE17Lze.js +2 -0
  8. package/build/assets/{lib-build-DEOZ3A7n.js → lib-api-DLvscoll-INenJIDp.js} +863 -556
  9. package/build/assets/lib-worker-B7p9HUJX.js +2 -0
  10. package/build/assets/lib-worker-C6VkH7Kf.js +9006 -0
  11. package/build/assets/lib-worker-index-DCktGn3b.js +1964 -0
  12. package/build/assets/main-DZ0Ws1xk.css +1 -0
  13. package/build/assets/main-JLaHac0l.js +3844 -0
  14. package/build/assets/uri-CY1i0hlC.js +1 -0
  15. package/build/assets/worker-CaEIruuB.js +1 -0
  16. package/build/assets/worker-juGKbgx7.js +1 -0
  17. package/build/embed.html +4 -8
  18. package/build/fkn.json +1 -1
  19. package/build/index.html +5 -8
  20. package/build/index.js +23838 -35935
  21. package/fkn.json +1 -1
  22. package/package.json +5 -2
  23. package/build/assets/Preview-DG9nqCV0.js +0 -1
  24. package/build/assets/compat-CusyxzKh.js +0 -1
  25. package/build/assets/custom-media-element-BDICDseJ.js +0 -43
  26. package/build/assets/dash.all.min-Dbg8AB-J.js +0 -19
  27. package/build/assets/dist-BgIerfpp.js +0 -3136
  28. package/build/assets/dist-BrpV89uJ.js +0 -1
  29. package/build/assets/dist-D-OKiX-f.js +0 -1
  30. package/build/assets/dist-D_XB-JLn.js +0 -40
  31. package/build/assets/embed-DBjG5JMH.js +0 -1
  32. package/build/assets/index-BHgdalnH.js +0 -1401
  33. package/build/assets/lib-Preview-B6uZKyhl.js +0 -82
  34. package/build/assets/lib-account-Cw8yCZtf.js +0 -2
  35. package/build/assets/lib-api-DLvscoll-DhlBp9Wz.js +0 -312
  36. package/build/assets/lib-api-DVwR-22s.js +0 -2
  37. package/build/assets/lib-compat-D8G4_Lzi.js +0 -860
  38. package/build/assets/lib-custom-media-element-CnANKrGl.js +0 -217
  39. package/build/assets/lib-dash.all.min-CDvdorbj.js +0 -27251
  40. package/build/assets/lib-dist-Dv8d3Kr0.js +0 -7
  41. package/build/assets/lib-dist-S8Gxnnq-.js +0 -12468
  42. package/build/assets/lib-dist-T0QlKbbk.js +0 -18578
  43. package/build/assets/lib-dist-xBHT3Lfz.js +0 -911
  44. package/build/assets/lib-react-BEg4mBBK.js +0 -112
  45. package/build/assets/lib-react-C0OCUIWX.js +0 -434
  46. package/build/assets/lib-react-CAkOlDha.js +0 -367
  47. package/build/assets/lib-react-CGlZXIjl.js +0 -2187
  48. package/build/assets/lib-react-CLVoi_ZM.js +0 -334
  49. package/build/assets/lib-react-DUxKSzCt.js +0 -311
  50. package/build/assets/lib-react-QvmpnEVK.js +0 -334
  51. package/build/assets/lib-react-WTnxAo6F.js +0 -202
  52. package/build/assets/lib-remote-DeY2A2G7.js +0 -416
  53. package/build/assets/lib-remote-DxEZmpd0.js +0 -2
  54. package/build/assets/lib-worker-index-C7ynIZYg.js +0 -1401
  55. package/build/assets/main-DejLBzlj.js +0 -3349
  56. package/build/assets/players-BIbP12aF.js +0 -1530
  57. package/build/assets/preload-helper-D2XUqLHy.js +0 -1
  58. package/build/assets/react-BDr8Ag8b.js +0 -19
  59. package/build/assets/react-BTju4bmn.js +0 -22
  60. package/build/assets/react-CLMfdUXR.js +0 -2
  61. package/build/assets/react-CjmRCHoG.js +0 -34
  62. package/build/assets/react-Cs34a503.js +0 -19
  63. package/build/assets/react-DKSDz1wJ.js +0 -6
  64. package/build/assets/react-bkM_mQGd.js +0 -17
  65. package/build/assets/react-kPj0f67l.js +0 -21
  66. package/build/assets/rolldown-runtime-CNC7AqOf.js +0 -1
  67. /package/build/assets/{players-3a7RYKgR.css → embed-3a7RYKgR.css} +0 -0
@@ -1,3349 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-DKSDz1wJ.js","assets/compat-CusyxzKh.js","assets/rolldown-runtime-CNC7AqOf.js","assets/dist-D_XB-JLn.js","assets/custom-media-element-BDICDseJ.js","assets/react-CLMfdUXR.js","assets/preload-helper-D2XUqLHy.js","assets/dist-BgIerfpp.js","assets/dist-BrpV89uJ.js","assets/react-bkM_mQGd.js","assets/react-BDr8Ag8b.js","assets/react-CjmRCHoG.js","assets/react-BTju4bmn.js","assets/react-kPj0f67l.js","assets/react-Cs34a503.js","assets/Preview-DG9nqCV0.js"])))=>i.map(i=>d[i]);
2
- import{i as e,t}from"./rolldown-runtime-CNC7AqOf.js";import{A as n,C as r,D as i,E as a,M as o,N as s,O as c,P as l,S as u,T as d,_ as f,a as p,b as m,c as h,d as g,f as _,g as v,h as y,i as b,j as x,k as S,l as C,m as w,n as T,o as E,p as D,r as O,s as k,t as A,u as j,v as M,w as N,x as P,y as ee}from"./players-BIbP12aF.js";import{A as te,C as F,D as ne,E as re,O as ie,S as I,b as L,c as ae,d as oe,f as R,g as z,h as se,i as ce,k as le,l as ue,m as de,n as fe,o as pe,p as me,s as he,t as ge,u as _e,v as ve,w as B,x as V,y as H}from"./compat-CusyxzKh.js";import{a as ye}from"./build-BuC_lDPE.js";import{r as be}from"./account-DQlY5DdH.js";import{t as xe}from"./preload-helper-D2XUqLHy.js";import{t as Se}from"./remote-CW2xewp5.js";le();var Ce={NAME:`Name`,DOCUMENT:`Document`,OPERATION_DEFINITION:`OperationDefinition`,VARIABLE_DEFINITION:`VariableDefinition`,SELECTION_SET:`SelectionSet`,FIELD:`Field`,ARGUMENT:`Argument`,FRAGMENT_SPREAD:`FragmentSpread`,INLINE_FRAGMENT:`InlineFragment`,FRAGMENT_DEFINITION:`FragmentDefinition`,VARIABLE:`Variable`,INT:`IntValue`,FLOAT:`FloatValue`,STRING:`StringValue`,BOOLEAN:`BooleanValue`,NULL:`NullValue`,ENUM:`EnumValue`,LIST:`ListValue`,OBJECT:`ObjectValue`,OBJECT_FIELD:`ObjectField`,DIRECTIVE:`Directive`,NAMED_TYPE:`NamedType`,LIST_TYPE:`ListType`,NON_NULL_TYPE:`NonNullType`},we=class extends Error{constructor(e,t,n,r,i,a,o){super(e),this.name=`GraphQLError`,this.message=e,i&&(this.path=i),t&&(this.nodes=Array.isArray(t)?t:[t]),n&&(this.source=n),r&&(this.positions=r),a&&(this.originalError=a);var s=o;if(!s&&a){var c=a.extensions;c&&typeof c==`object`&&(s=c)}this.extensions=s||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return`GraphQLError`}},U,W;function Te(e){return new we(`Syntax Error: Unexpected token at ${W} in ${e}`)}function Ee(e){if(e.lastIndex=W,e.test(U))return U.slice(W,W=e.lastIndex)}var De=/ +(?=[^\s])/y;function Oe(e){for(var t=e.split(`
3
- `),n=``,r=0,i=0,a=t.length-1,o=0;o<t.length;o++)De.lastIndex=0,De.test(t[o])&&(o&&(!r||De.lastIndex<r)&&(r=De.lastIndex),i||=o,a=o);for(var s=i;s<=a;s++)s!==i&&(n+=`
4
- `),n+=t[s].slice(r).replace(/\\"""/g,`"""`);return n}function G(){for(var e=0|U.charCodeAt(W++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|U.charCodeAt(W++))if(e===35)for(;(e=0|U.charCodeAt(W++))&&e!==10&&e!==13;);W--}function ke(){for(var e=W,t=0|U.charCodeAt(W++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|U.charCodeAt(W++));if(e===W-1)throw Te(`Name`);var n=U.slice(e,--W);return G(),n}function Ae(){return{kind:`Name`,value:ke()}}var je=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Me=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function Ne(e){var t;switch(U.charCodeAt(W)){case 91:W++,G();for(var n=[];U.charCodeAt(W)!==93;)n.push(Ne(e));return W++,G(),{kind:`ListValue`,values:n};case 123:W++,G();for(var r=[];U.charCodeAt(W)!==125;){var i=Ae();if(U.charCodeAt(W++)!==58)throw Te(`ObjectField`);G(),r.push({kind:`ObjectField`,name:i,value:Ne(e)})}return W++,G(),{kind:`ObjectValue`,fields:r};case 36:if(e)throw Te(`Variable`);return W++,{kind:`Variable`,name:Ae()};case 34:if(U.charCodeAt(W+1)===34&&U.charCodeAt(W+2)===34){if(W+=3,(t=Ee(je))==null)throw Te(`StringValue`);return G(),{kind:`StringValue`,value:Oe(t.slice(0,-3)),block:!0}}else{var a=W,o;W++;var s=!1;for(o=0|U.charCodeAt(W++);o===92&&(W++,s=!0)||o!==10&&o!==13&&o!==34&&o;o=0|U.charCodeAt(W++));if(o!==34)throw Te(`StringValue`);return t=U.slice(a,W),G(),{kind:`StringValue`,value:s?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var c=W++,l;(l=0|U.charCodeAt(W++))>=48&&l<=57;);var u=U.slice(c,--W);if((l=U.charCodeAt(W))===46||l===69||l===101){if((t=Ee(Me))==null)throw Te(`FloatValue`);return G(),{kind:`FloatValue`,value:u+t}}else return G(),{kind:`IntValue`,value:u};case 110:if(U.charCodeAt(W+1)===117&&U.charCodeAt(W+2)===108&&U.charCodeAt(W+3)===108)return W+=4,G(),{kind:`NullValue`};break;case 116:if(U.charCodeAt(W+1)===114&&U.charCodeAt(W+2)===117&&U.charCodeAt(W+3)===101)return W+=4,G(),{kind:`BooleanValue`,value:!0};break;case 102:if(U.charCodeAt(W+1)===97&&U.charCodeAt(W+2)===108&&U.charCodeAt(W+3)===115&&U.charCodeAt(W+4)===101)return W+=5,G(),{kind:`BooleanValue`,value:!1};break}return{kind:`EnumValue`,value:ke()}}function Pe(e){if(U.charCodeAt(W)===40){var t=[];W++,G();do{var n=Ae();if(U.charCodeAt(W++)!==58)throw Te(`Argument`);G(),t.push({kind:`Argument`,name:n,value:Ne(e)})}while(U.charCodeAt(W)!==41);return W++,G(),t}}function Fe(e){if(U.charCodeAt(W)===64){var t=[];do W++,t.push({kind:`Directive`,name:Ae(),arguments:Pe(e)});while(U.charCodeAt(W)===64);return t}}function Ie(){for(var e=0;U.charCodeAt(W)===91;)e++,W++,G();var t={kind:`NamedType`,name:Ae()};do if(U.charCodeAt(W)===33&&(W++,G(),t={kind:`NonNullType`,type:t}),e){if(U.charCodeAt(W++)!==93)throw Te(`NamedType`);G(),t={kind:`ListType`,type:t}}while(e--);return t}function Le(){if(U.charCodeAt(W++)!==123)throw Te(`SelectionSet`);return G(),Re()}function Re(){var e=[];do if(U.charCodeAt(W)===46){if(U.charCodeAt(++W)!==46||U.charCodeAt(++W)!==46)throw Te(`SelectionSet`);switch(W++,G(),U.charCodeAt(W)){case 64:e.push({kind:`InlineFragment`,typeCondition:void 0,directives:Fe(!1),selectionSet:Le()});break;case 111:U.charCodeAt(W+1)===110?(W+=2,G(),e.push({kind:`InlineFragment`,typeCondition:{kind:`NamedType`,name:Ae()},directives:Fe(!1),selectionSet:Le()})):e.push({kind:`FragmentSpread`,name:Ae(),directives:Fe(!1)});break;case 123:W++,G(),e.push({kind:`InlineFragment`,typeCondition:void 0,directives:void 0,selectionSet:Re()});break;default:e.push({kind:`FragmentSpread`,name:Ae(),directives:Fe(!1)})}}else{var t=Ae(),n=void 0;U.charCodeAt(W)===58&&(W++,G(),n=t,t=Ae());var r=Pe(!1),i=Fe(!1),a=void 0;U.charCodeAt(W)===123&&(W++,G(),a=Re()),e.push({kind:`Field`,alias:n,name:t,arguments:r,directives:i,selectionSet:a})}while(U.charCodeAt(W)!==125);return W++,G(),{kind:`SelectionSet`,selections:e}}function ze(){if(G(),U.charCodeAt(W)===40){var e=[];W++,G();do{var t=void 0;if(U.charCodeAt(W)===34&&(t=Ne(!0)),U.charCodeAt(W++)!==36)throw Te(`Variable`);var n=Ae();if(U.charCodeAt(W++)!==58)throw Te(`VariableDefinition`);G();var r=Ie(),i=void 0;U.charCodeAt(W)===61&&(W++,G(),i=Ne(!0)),G();var a={kind:`VariableDefinition`,variable:{kind:`Variable`,name:n},type:r,defaultValue:i,directives:Fe(!0)};t&&(a.description=t),e.push(a)}while(U.charCodeAt(W)!==41);return W++,G(),e}}function Be(e){var t=Ae();if(U.charCodeAt(W++)!==111||U.charCodeAt(W++)!==110)throw Te(`FragmentDefinition`);G();var n={kind:`FragmentDefinition`,name:t,typeCondition:{kind:`NamedType`,name:Ae()},directives:Fe(!1),selectionSet:Le()};return e&&(n.description=e),n}function Ve(){var e=[];do{var t=void 0;if(U.charCodeAt(W)===34&&(t=Ne(!0)),U.charCodeAt(W)===123){if(t)throw Te(`Document`);W++,G(),e.push({kind:`OperationDefinition`,operation:`query`,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Re()})}else{var n=ke();switch(n){case`fragment`:e.push(Be(t));break;case`query`:case`mutation`:case`subscription`:var r,i=void 0;(r=U.charCodeAt(W))!==40&&r!==64&&r!==123&&(i=Ae());var a={kind:`OperationDefinition`,operation:n,name:i,variableDefinitions:ze(),directives:Fe(!1),selectionSet:Le()};t&&(a.description=t),e.push(a);break;default:throw Te(`Document`)}}}while(W<U.length);return e}function He(e,t){return U=e.body?e.body:e,W=0,G(),t&&t.noLocation?{kind:`Document`,definitions:Ve()}:{kind:`Document`,definitions:Ve(),loc:{start:0,end:U.length,startToken:void 0,endToken:void 0,source:{body:U,name:`graphql.web`,locationOffset:{line:1,column:1}}}}}function Ue(e,t,n){for(var r=``,i=0;i<e.length;i++)i&&(r+=t),r+=n(e[i]);return r}function We(e){return JSON.stringify(e)}function Ge(e){return`"""
5
- `+e.replace(/"""/g,`\\"""`)+`
6
- """`}var Ke=`
7
- `,K={OperationDefinition(e){var t=``;e.description&&(t+=K.StringValue(e.description)+`
8
- `),t+=e.operation,e.name&&(t+=` `+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=` `),t+=`(`+Ue(e.variableDefinitions,`, `,K.VariableDefinition)+`)`),e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive));var n=K.SelectionSet(e.selectionSet);return t===`query`?n:t+` `+n},VariableDefinition(e){var t=``;return e.description&&(t+=K.StringValue(e.description)+` `),t+=K.Variable(e.variable)+`: `+qe(e.type),e.defaultValue&&(t+=` = `+qe(e.defaultValue)),e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive)),t},Field(e){var t=e.alias?e.alias.value+`: `+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var n=Ue(e.arguments,`, `,K.Argument);t.length+n.length+2>80?t+=`(`+(Ke+=` `)+Ue(e.arguments,Ke,K.Argument)+(Ke=Ke.slice(0,-2))+`)`:t+=`(`+n+`)`}return e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=` `+K.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?Ge(e.value).replace(/\n/g,Ke):We(e.value)},BooleanValue:e=>``+e.value,NullValue:e=>`null`,IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>`$`+e.name.value,ListValue:e=>`[`+Ue(e.values,`, `,qe)+`]`,ObjectValue:e=>`{`+Ue(e.fields,`, `,K.ObjectField)+`}`,ObjectField:e=>e.name.value+`: `+qe(e.value),Document(e){return!e.definitions||!e.definitions.length?``:Ue(e.definitions,`
9
-
10
- `,qe)},SelectionSet:e=>`{`+(Ke+=` `)+Ue(e.selections,Ke,qe)+(Ke=Ke.slice(0,-2))+`}`,Argument:e=>e.name.value+`: `+qe(e.value),FragmentSpread(e){var t=`...`+e.name.value;return e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive)),t},InlineFragment(e){var t=`...`;return e.typeCondition&&(t+=` on `+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive)),t+=` `+K.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t=``;return e.description&&(t+=K.StringValue(e.description)+`
11
- `),t+=`fragment `+e.name.value,t+=` on `+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=` `+Ue(e.directives,` `,K.Directive)),t+` `+K.SelectionSet(e.selectionSet)},Directive(e){var t=`@`+e.name.value;return e.arguments&&e.arguments.length&&(t+=`(`+Ue(e.arguments,`, `,K.Argument)+`)`),t},NamedType:e=>e.name.value,ListType:e=>`[`+qe(e.type)+`]`,NonNullType:e=>qe(e.type)+`!`},qe=e=>K[e.kind](e);function Je(e){return Ke=`
12
- `,K[e.kind]?K[e.kind](e):``}function Ye(e,t){switch(e.kind){case`NullValue`:return null;case`IntValue`:return parseInt(e.value,10);case`FloatValue`:return parseFloat(e.value);case`StringValue`:case`EnumValue`:case`BooleanValue`:return e.value;case`ListValue`:for(var n=[],r=0,i=e.values.length;r<i;r++)n.push(Ye(e.values[r],t));return n;case`ObjectValue`:for(var a=Object.create(null),o=0,s=e.fields.length;o<s;o++){var c=e.fields[o];a[c.name.value]=Ye(c.value,t)}return a;case`Variable`:return t&&t[e.name.value]}}var Xe=()=>{},Ze=Xe;function Qe(e){return{tag:0,0:e}}function $e(e){return{tag:1,0:e}}var et=()=>typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`,tt=e=>e;function nt(e){return t=>n=>{var r=Ze;t((t=>{t===0?n(0):t.tag===0?(r=t[0],n(t)):e(t[0])?n(t):r(0)}))}}function rt(e){return t=>n=>t((t=>{t===0||t.tag===0?n(t):n($e(e(t[0])))}))}function it(e){return t=>n=>{var r=[],i=Ze,a=!1,o=!1;t((t=>{o||(t===0?(o=!0,r.length||n(0)):t.tag===0?i=t[0]:(a=!1,(function(e){var t=Ze;e((e=>{if(e===0){if(r.length){var s=r.indexOf(t);s>-1&&(r=r.slice()).splice(s,1),r.length||(o?n(0):a||(a=!0,i(0)))}}else e.tag===0?(r.push(t=e[0]),t(0)):r.length&&(n(e),t(0))}))})(e(t[0])),a||(a=!0,i(0))))})),n(Qe((e=>{if(e===1){o||(o=!0,i(1));for(var t=0,n=r,s=r.length;t<s;t++)n[t](1);r.length=0}else{!o&&!a?(a=!0,i(0)):a=!1;for(var c=0,l=r,u=r.length;c<u;c++)l[c](0)}})))}}function at(e){return it(tt)(e)}function ot(e){return at(vt(e))}function st(e){return t=>n=>{var r=!1;t((t=>{if(!r)if(t===0)r=!0,n(0),e();else if(t.tag===0){var i=t[0];n(Qe((t=>{t===1?(r=!0,i(1),e()):i(t)})))}else n(t)}))}}function ct(e){return t=>n=>{var r=!1;t((t=>{if(!r)if(t===0)r=!0,n(0);else if(t.tag===0){var i=t[0];n(Qe((e=>{e===1&&(r=!0),i(e)})))}else e(t[0]),n(t)}))}}function lt(e){return t=>n=>t((t=>{t===0?n(0):t.tag===0?(n(t),e()):n(t)}))}function ut(e){var t=[],n=Ze,r=!1;return i=>{t.push(i),t.length===1&&e((e=>{if(e===0){for(var i=0,a=t,o=t.length;i<o;i++)a[i](0);t.length=0}else if(e.tag===0)n=e[0];else{r=!1;for(var s=0,c=t,l=t.length;s<l;s++)c[s](e)}})),i(Qe((e=>{if(e===1){var a=t.indexOf(i);a>-1&&(t=t.slice()).splice(a,1),t.length||n(1)}else r||(r=!0,n(0))})))}}function dt(e){return t=>n=>{var r=Ze,i=Ze,a=!1,o=!1,s=!1,c=!1;t((t=>{c||(t===0?(c=!0,s||n(0)):t.tag===0?r=t[0]:(s&&(i(1),i=Ze),a?a=!1:(a=!0,r(0)),(function(e){s=!0,e((e=>{s&&(e===0?(s=!1,c?n(0):a||(a=!0,r(0))):e.tag===0?(o=!1,(i=e[0])(0)):(n(e),o?o=!1:i(0)))}))})(e(t[0]))))})),n(Qe((e=>{e===1?(c||(c=!0,r(1)),s&&(s=!1,i(1))):(!c&&!a&&(a=!0,r(0)),s&&!o&&(o=!0,i(0)))})))}}function ft(e){return t=>n=>{var r=Ze,i=!1,a=0;t((t=>{i||(t===0?(i=!0,n(0)):t.tag===0?e<=0?(i=!0,n(0),t[0](1)):r=t[0]:a++<e?(n(t),!i&&a>=e&&(i=!0,n(0),r(1))):n(t))})),n(Qe((t=>{t===1&&!i?(i=!0,r(1)):t===0&&!i&&a<e&&r(0)})))}}function pt(e){return t=>n=>{var r=Ze,i=Ze,a=!1;t((t=>{a||(t===0?(a=!0,i(1),n(0)):t.tag===0?(r=t[0],e((e=>{e===0||(e.tag===0?(i=e[0])(0):(a=!0,i(1),r(1),n(0)))}))):n(t))})),n(Qe((e=>{e===1&&!a?(a=!0,r(1),i(1)):a||r(0)})))}}function mt(e,t){return n=>r=>{var i=Ze,a=!1;n((n=>{a||(n===0?(a=!0,r(0)):n.tag===0?(i=n[0],r(n)):e(n[0])?r(n):(a=!0,t&&r(n),r(0),i(1)))}))}}function ht(e){return t=>e()(t)}function gt(e){return t=>{var n=e[et()]&&e[et()]()||e,r=!1,i=!1,a=!1,o;t(Qe((async e=>{if(e===1)r=!0,n.return&&n.return();else if(i)a=!0;else{for(a=i=!0;a&&!r;)if((o=await n.next()).done)r=!0,n.return&&await n.return(),t(0);else try{a=!1,t($e(o.value))}catch(e){if(n.throw)(r=!!(await n.throw(e)).done)&&t(0);else throw e}i=!1}})))}}function _t(e){return e[Symbol.asyncIterator]?gt(e):t=>{var n=e[Symbol.iterator](),r=!1,i=!1,a=!1,o;t(Qe((e=>{if(e===1)r=!0,n.return&&n.return();else if(i)a=!0;else{for(a=i=!0;a&&!r;)if((o=n.next()).done)r=!0,n.return&&n.return(),t(0);else try{a=!1,t($e(o.value))}catch(e){if(n.throw)(r=!!n.throw(e).done)&&t(0);else throw e}i=!1}})))}}var vt=_t;function yt(e){return t=>{var n=!1;t(Qe((r=>{r===1?n=!0:n||(n=!0,t($e(e)),t(0))})))}}function bt(e){return t=>{var n=!1,r=e({next(e){n||t($e(e))},complete(){n||(n=!0,t(0))}});t(Qe((e=>{e===1&&!n&&(n=!0,r())})))}}function xt(){var e,t;return{source:ut(bt((n=>(e=n.next,t=n.complete,Xe)))),next(t){e&&e(t)},complete(){t&&t()}}}var St=e=>{var t=!1;e(Qe((n=>{n===1?t=!0:t||(t=!0,e(0))})))};function Ct(e){return bt((t=>(e.then((e=>{Promise.resolve(e).then((()=>{t.next(e),t.complete()}))})),Xe)))}function wt(e){return t=>{var n=Ze,r=!1;return t((t=>{t===0?r=!0:t.tag===0?(n=t[0])(0):r||(e(t[0]),n(0))})),{unsubscribe(){r||(r=!0,n(1))}}}}function Tt(e){wt((e=>{}))(e)}function Et(e){return new Promise((t=>{var n=Ze,r;e((e=>{e===0?Promise.resolve(r).then(t):e.tag===0?(n=e[0])(0):(r=e[0],n(0))}))}))}var Dt=(...e)=>{for(var t=e[0],n=1,r=e.length;n<r;n++)t=e[n](t);return t},Ot=e=>e&&typeof e.message==`string`&&(e.extensions||e.name===`GraphQLError`)?e:typeof e==`object`&&typeof e.message==`string`?new we(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new we(e),kt=class extends Error{constructor(e){var t=(e.graphQLErrors||[]).map(Ot),n=((e,t)=>{var n=``;if(e)return`[Network] ${e.message}`;if(t)for(var r=0,i=t.length;r<i;r++)n&&(n+=`
13
- `),n+=`[GraphQL] ${t[r].message}`;return n})(e.networkError,t);super(n),this.name=`CombinedError`,this.message=n,this.graphQLErrors=t,this.networkError=e.networkError,this.response=e.response}toString(){return this.message}},At=(e,t)=>{for(var n=0|(t||5381),r=0,i=0|e.length;r<i;r++)n=(n<<5)+n+e.charCodeAt(r);return n},jt=new Set,Mt=new WeakMap,Nt=(e,t)=>{if(e===null||jt.has(e))return`null`;if(typeof e!=`object`)return JSON.stringify(e)||``;if(e.toJSON)return Nt(e.toJSON(),t);if(Array.isArray(e)){for(var n=`[`,r=0,i=e.length;r<i;r++)n.length>1&&(n+=`,`),n+=Nt(e[r],t)||`null`;return n+=`]`}else if(!t&&(Lt!==It&&e instanceof Lt||Rt!==It&&e instanceof Rt))return`null`;var a=Object.keys(e).sort();if(!a.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=Mt.get(e)||Math.random().toString(36).slice(2);return Mt.set(e,o),Nt({__key:o},t)}jt.add(e);for(var s=`{`,c=0,l=a.length;c<l;c++){var u=Nt(e[a[c]],t);u&&(s.length>1&&(s+=`,`),s+=Nt(a[c],t)+`:`+u)}return jt.delete(e),s+=`}`},Pt=(e,t,n)=>{if(!(typeof n!=`object`||!n||n.toJSON||jt.has(n)))if(Array.isArray(n))for(var r=0,i=n.length;r<i;r++)Pt(e,`${t}.${r}`,n[r]);else if(n instanceof Lt||n instanceof Rt)e.set(t,n);else for(var a in jt.add(n),n)Pt(e,`${t}.${a}`,n[a])},Ft=(e,t)=>(jt.clear(),Nt(e,t||!1)),It=class{},Lt=typeof File<`u`?File:It,Rt=typeof Blob<`u`?Blob:It,zt=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,Bt=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,Vt=(e,t)=>t%2==0?e.replace(Bt,`
14
- `):e,Ht=e=>e.split(zt).map(Vt).join(``).trim(),Ut=new Map,Wt=new Map,Gt=e=>{var t;return typeof e==`string`?t=Ht(e):e.loc&&Wt.get(e.__key)===e?t=e.loc.source.body:(t=Ut.get(e)||Ht(Je(e)),Ut.set(e,t)),typeof e!=`string`&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:`gql`,locationOffset:{line:1,column:1}}}),t},Kt=e=>{var t;if(e.documentId)t=At(e.documentId);else if(t=At(Gt(e)),e.definitions){var n=Yt(e);n&&(t=At(`\n# ${n}`,t))}return t},qt=e=>{var t,n;return typeof e==`string`?(t=Kt(e),n=Wt.get(t)||He(e,{noLocation:!0})):(t=e.__key||Kt(e),n=Wt.get(t)||e),n.loc||Gt(n),n.__key=t,Wt.set(t,n),n},Jt=(e,t,n)=>{var r=t||{},i=qt(e),a=Ft(r,!0),o=i.__key;return a!==`{}`&&(o=At(a,o)),{key:o,query:i,variables:r,extensions:n}},Yt=e=>{for(var t=0,n=e.definitions.length;t<n;t++){var r=e.definitions[t];if(r.kind===Ce.OPERATION_DEFINITION)return r.name?r.name.value:void 0}},Xt=(e,t,n)=>{if(!(`data`in t||`errors`in t&&Array.isArray(t.errors)))throw Error(`No Content`);var r=e.kind===`subscription`;return{operation:e,data:t.data,error:Array.isArray(t.errors)?new kt({graphQLErrors:t.errors,response:n}):void 0,extensions:t.extensions?{...t.extensions}:void 0,hasNext:t.hasNext==null?r:t.hasNext,stale:!1}},Zt=(e,t)=>{if(typeof e==`object`&&e){if(Array.isArray(e)){e=[...e];for(var n=0,r=t.length;n<r;n++)e[n]=Zt(e[n],t[n]);return e}if(!e.constructor||e.constructor===Object){for(var i in e={...e},t)e[i]=Zt(e[i],t[i]);return e}}return t},Qt=(e,t,n,r)=>{var i=e.error?e.error.graphQLErrors:[],a=!!e.extensions||!!(t.payload||t).extensions,o={...e.extensions,...(t.payload||t).extensions},s=t.incremental;`path`in t&&(s=[t]);var c={data:e.data};if(s)for(var l=function(){var e=s[u];Array.isArray(e.errors)&&i.push(...e.errors),e.extensions&&(Object.assign(o,e.extensions),a=!0);var t=`data`,n=c,l=[];if(e.path)l=e.path;else if(r){var d=r.find((t=>t.id===e.id));l=e.subPath?[...d.path,...e.subPath]:d.path}for(var f=0,p=l.length;f<p;t=l[f++])n=n[t]=Array.isArray(n[t])?[...n[t]]:{...n[t]};if(e.items)for(var m=+t>=0?t:0,h=0,g=e.items.length;h<g;h++)n[m+h]=Zt(n[m+h],e.items[h]);else e.data!==void 0&&(n[t]=Zt(n[t],e.data))},u=0,d=s.length;u<d;u++)l();else c.data=(t.payload||t).data||e.data,i=t.errors||t.payload&&t.payload.errors||i;return{operation:e.operation,data:c.data,error:i.length?new kt({graphQLErrors:i,response:n}):void 0,extensions:a?o:void 0,hasNext:t.hasNext==null?e.hasNext:t.hasNext,stale:!1}},$t=(e,t,n)=>({operation:e,data:void 0,error:new kt({networkError:t,response:n}),extensions:void 0,hasNext:!1,stale:!1});function en(e){var t={query:void 0,documentId:void 0,operationName:Yt(e.query),variables:e.variables||void 0,extensions:e.extensions};return`documentId`in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?t.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(t.query=Gt(e.query)),t}var tn=(e,t)=>{var n=e.kind===`query`&&e.context.preferGetMethod;if(!n||!t)return e.context.url;var r=nn(e.context.url);for(var i in t){var a=t[i];a&&r[1].set(i,typeof a==`object`?Ft(a):a)}var o=r.join(`?`);return o.length>2047&&n!==`force`?(e.context.preferGetMethod=!1,e.context.url):o},nn=e=>{var t=e.indexOf(`?`);return t>-1?[e.slice(0,t),new URLSearchParams(e.slice(t+1))]:[e,new URLSearchParams]},rn=(e,t)=>{if(t&&!(e.kind===`query`&&e.context.preferGetMethod)){var n=Ft(t),r=(e=>{var t=new Map;return(Lt!==It||Rt!==It)&&(jt.clear(),Pt(t,`variables`,e)),t})(t.variables);if(r.size){var i=new FormData;i.append(`operations`,n),i.append(`map`,Ft({...[...r.keys()].map((e=>[e]))}));var a=0;for(var o of r.values())i.append(``+a++,o);return i}return n}},an=(e,t)=>{var n={accept:e.kind===`subscription`?`text/event-stream, multipart/mixed`:`application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed`},r=(typeof e.context.fetchOptions==`function`?e.context.fetchOptions():e.context.fetchOptions)||{};if(r.headers)if((e=>`has`in e&&!Object.keys(e).length)(r.headers))r.headers.forEach(((e,t)=>{n[t]=e}));else if(Array.isArray(r.headers))r.headers.forEach(((e,t)=>{Array.isArray(e)?n[e[0]]?n[e[0]]=`${n[e[0]]},${e[1]}`:n[e[0]]=e[1]:n[t]=e}));else for(var i in r.headers)n[i.toLowerCase()]=r.headers[i];var a=rn(e,t);return typeof a==`string`&&!n[`content-type`]&&(n[`content-type`]=`application/json`),{...r,method:a?`POST`:`GET`,body:a,headers:n}},on=/boundary="?([^=";]+)"?/i,sn=/data: ?([^\n]+)/;async function*cn(e){if(e.body[Symbol.asyncIterator])for await(var t of e.body)yield t;else{var n=e.body.getReader(),r;try{for(;!(r=await n.read()).done;)yield r.value}finally{n.cancel()}}}async function*ln(e,t){var n=typeof TextDecoder<`u`?new TextDecoder:null,r=``,i;for await(var a of e)for(r+=a.constructor.name===`Buffer`?a.toString():n.decode(a,{stream:!0});(i=r.indexOf(t))>-1;)yield r.slice(0,i),r=r.slice(i+t.length)}async function*un(e,t,n){var r=!0,i=null,a;try{yield await Promise.resolve();var o=(a=await(e.context.fetch||fetch)(t,n)).headers.get(`Content-Type`)||``,s=/multipart\/mixed/i.test(o)?async function*(e,t){var n=e.match(on),r=`--`+(n?n[1]:`-`),i=!0,a;for await(var o of ln(cn(t),`\r
15
- `+r)){if(i){i=!1;var s=o.indexOf(r);if(s>-1)o=o.slice(s+r.length);else continue}try{yield a=JSON.parse(o.slice(o.indexOf(`\r
16
- \r
17
- `)+4))}catch(e){if(!a)throw e}if(a&&!1===a.hasNext)break}a&&!1!==a.hasNext&&(yield{hasNext:!1})}(o,a):/text\/event-stream/i.test(o)?async function*(e){var t;for await(var n of ln(cn(e),`
18
-
19
- `)){var r=n.match(sn);if(r){var i=r[1];try{yield t=JSON.parse(i)}catch(e){if(!t)throw e}if(t&&!1===t.hasNext)break}}t&&!1!==t.hasNext&&(yield{hasNext:!1})}(a):/text\//i.test(o)?async function*(e){var t=await e.text();try{yield JSON.parse(t)}catch{throw Error(t)}}(a):async function*(e){yield JSON.parse(await e.text())}(a),c;for await(var l of s)l.pending&&!i?c=l.pending:l.pending&&(c=[...c,...l.pending]),i=i?Qt(i,l,a,c):Xt(e,l,a),r=!1,yield i,r=!0;i||(yield i=Xt(e,{},a))}catch(t){if(!r)throw t;yield $t(e,a&&(a.status<200||a.status>=300)&&a.statusText?Error(a.statusText):t,a)}}function dn(e,t,n){var r;return typeof AbortController<`u`&&(n.signal=(r=new AbortController).signal),st((()=>{r&&r.abort()}))(nt((e=>!!e))(gt(un(e,t,n))))}function fn(e){var t=t=>e(t);return t.toPromise=()=>Et(ft(1)(nt((e=>!e.stale&&!e.hasNext))(t))),t.then=(e,n)=>t.toPromise().then(e,n),t.subscribe=e=>wt(e)(t),t}function pn(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var mn=()=>{},hn=({forward:e,dispatchDebug:t})=>t=>ot([it((e=>{var n=en(e),r=tn(e,n),i=an(e,n);return pt(nt((t=>t.kind===`teardown`&&t.key===e.key))(t))(dn(e,r,i))}))(nt((e=>e.kind!==`teardown`&&(e.kind!==`subscription`||!!e.context.fetchSubscriptions)))(t)),e(nt((e=>e.kind===`teardown`||e.kind===`subscription`&&!e.context.fetchSubscriptions))(t))]),gn=e=>({client:t,forward:n,dispatchDebug:r})=>e.reduceRight(((e,n)=>n({client:t,forward(t){return ut(e(ut(t)))},dispatchDebug(e){}})),n),_n=({onOperation:e,onResult:t,onError:n})=>({forward:r})=>i=>it((e=>{n&&e.error&&n(e.error,e.operation);var r=t&&t(e)||e;return`then`in r?Ct(r):yt(r)}))(r(it((t=>{var n=e&&e(t)||t;return`then`in n?Ct(n):yt(n)}))(i))),vn=({dispatchDebug:e})=>e=>nt((e=>!1))(e),yn=function e(t){var n=0,r=new Map,i=new Map,a=new Set,o=[],s={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod,requestPolicy:t.requestPolicy||`cache-first`},c=xt();function l(e){(e.kind===`mutation`||e.kind===`teardown`||!a.has(e.key))&&(e.kind===`teardown`?a.delete(e.key):e.kind!==`mutation`&&a.add(e.key),c.next(e))}var u=!1;function d(e){if(e&&l(e),!u){for(u=!0;u&&(e=o.shift());)l(e);u=!1}}var f=e=>{var t=pt(nt((t=>t.kind===`teardown`&&t.key===e.key))(c.source))(nt((t=>t.operation.kind===e.kind&&t.operation.key===e.key&&(!t.operation.context._instance||t.operation.context._instance===e.context._instance)))(g));return t=e.kind===`query`?dt((t=>{var n=yt(t);return t.stale||t.hasNext?n:ot([n,rt((()=>(t.stale=!0,t)))(ft(1)(nt((t=>t.key===e.key))(c.source)))])}))(t):mt((e=>!!e.hasNext),!0)(t),t=e.kind===`mutation`?lt((()=>{l(e)}))(t):st((()=>{a.delete(e.key),r.delete(e.key),i.delete(e.key),u=!1;for(var t=o.length-1;t>=0;t--)o[t].key===e.key&&o.splice(t,1);l(pn(`teardown`,e,e.context))}))(ct((t=>{if(t.stale)if(!t.hasNext)a.delete(e.key);else for(var n=0;n<o.length;n++){var i=o[n];if(i.key===t.operation.key){a.delete(i.key);break}}else t.hasNext||a.delete(e.key);r.set(e.key,t)}))(t)),ut(t)},p=this instanceof e?this:Object.create(e.prototype),m=Object.assign(p,{suspense:!!t.suspense,operations$:c.source,reexecuteOperation(e){if(e.kind===`teardown`)d(e);else if(e.kind===`mutation`)o.push(e),Promise.resolve().then(d);else if(i.has(e.key)){for(var t=!1,n=0;n<o.length;n++)o[n].key===e.key&&(o[n]=e,t=!0);t||a.has(e.key)&&e.context.requestPolicy!==`network-only`?(a.delete(e.key),Promise.resolve().then(d)):(o.push(e),Promise.resolve().then(d))}},createRequestOperation(e,t,r){return r||={},pn(e,t,{_instance:e===`mutation`?n=n+1|0:void 0,...s,...r,requestPolicy:r.requestPolicy||s.requestPolicy,suspense:r.suspense||!1!==r.suspense&&m.suspense})},executeRequestOperation(e){return e.kind===`mutation`?fn(f(e)):fn(ht((()=>{var t=i.get(e.key);t||i.set(e.key,t=f(e)),t=lt((()=>{d(e)}))(t);var n=r.get(e.key);return e.kind===`query`&&n&&(n.stale||n.hasNext)?dt(yt)(ot([t,nt((t=>t===r.get(e.key)))(yt(n))])):t})))},executeQuery(e,t){var n=m.createRequestOperation(`query`,e,t);return m.executeRequestOperation(n)},executeSubscription(e,t){var n=m.createRequestOperation(`subscription`,e,t);return m.executeRequestOperation(n)},executeMutation(e,t){var n=m.createRequestOperation(`mutation`,e,t);return m.executeRequestOperation(n)},readQuery(e,t,n){var r=null;return wt((e=>{r=e}))(m.query(e,t,n)).unsubscribe(),r},query:(e,t,n)=>m.executeQuery(Jt(e,t),n),subscription:(e,t,n)=>m.executeSubscription(Jt(e,t),n),mutation:(e,t,n)=>m.executeMutation(Jt(e,t),n)}),h=mn,g=ut(gn(t.exchanges)({client:m,dispatchDebug:h,forward:vn({dispatchDebug:h})})(c.source));return Tt(g),m};R();var bn=ne({}),xn=bn.Provider;bn.Consumer,bn.displayName=`UrqlContext`;var Sn=()=>F(bn),Cn={fetching:!1,stale:!1,hasNext:!1,error:void 0,data:void 0,extensions:void 0,operation:void 0},wn=(e,t)=>e===t||!(!e||!t||e.key!==t.key),Tn=(e,t)=>{var n={...e,...t,data:t.data!==void 0||t.error?t.data:e.data,fetching:!!t.fetching,stale:!!t.stale};return((e,t)=>{for(var n in e)if(!(n in t))return!0;for(var r in t)if(r===`operation`?!wn(e[r],t[r]):e[r]!==t[r])return!0;return!1})(e,n)?n:e},En=(e,t)=>{for(var n=0,r=t.length;n<r;n++)if(e[n]!==t[n])return!0;return!1};function Dn(e,t){e(t)}function On(e,t){var n=z(void 0);return B((()=>{var r=Jt(e,t);return n.current!==void 0&&n.current.key===r.key?n.current:(n.current=r,r)}),[e,t])}function kn(e,t){var n=Sn(),r=On(e.query,e.variables),i=z(t);i.current=t;var a=B((()=>e.pause?null:n.executeSubscription(r,e.context)),[n,r,e.pause,e.context]),o=[n,r,e.context,e.pause],[s,c]=V((()=>[a,{...Cn,fetching:!!a},o])),l=s[1];a!==s[0]&&En(s[2],o)&&c([a,l=Tn(s[1],{fetching:!!a}),o]),H((()=>{var e=e=>{Dn(c,(t=>{var n=Tn(t[1],e);return t[1]===n?t:(i.current&&n.data!=null&&t[1].data!==n.data&&(n.data=i.current(t[1].data,n.data)),[t[0],n,t[2]])}))};if(s[0])return wt(e)(st((()=>{e({fetching:!!a})}))(s[0])).unsubscribe;e({fetching:!1})}),[s[0]]);var u=L((t=>{var i=n.executeSubscription(r,{...e.context,...t});Dn(c,(e=>[i,e[1],o]))}),[n,r,e.context,e.pause]);return[l,u]}I();function An(e){return new Worker(`/assets/index-BHgdalnH.js`,{type:`module`,name:e?.name})}var jn=(e,t)=>o.fetch(e,t),Mn=`banou26/stub`,Nn=`season-seed`,Pn=e=>`https://github.com/${Mn}/releases/download/${Nn}/${e}`,Fn=e=>e.startsWith(Pn(``)),In=`export`,Ln=`store`,Rn=(e,t)=>{try{return new URL(e,t).searchParams.getAll(In).includes(Ln)}catch{return!1}},zn=`seed`,Bn=(e,t)=>{try{return new URL(e,t).searchParams.getAll(zn).includes(`off`)}catch{return!1}},Vn=e=>typeof e==`string`?e:e instanceof URL?e.href:e.url,Hn=(e,t)=>Bn(e)&&Fn(Vn(t)),Un=new An;ye({fetch:(e,t)=>Hn(location.href,e)?new Response(null,{status:404,statusText:`the season seed is switched off for this page`}):jn(e,t)},{transport:Un,key:`fetch`});var{handleRequest:Wn,setUserKeys:Gn,registerRemoteSource:Kn,unregisterRemoteSource:qn,remotePicker:Jn,remotePlayer:Yn,selectRemoteRelease:Xn,exportStore:Zn}=await ye({},{transport:Un,key:`yoga`}),Qn=`stub-source@1`,$n=`stub-enabled-plugins`,er=3e3,tr=new Map,nr=new Set,rr=()=>nr.forEach(e=>{try{e()}catch{}}),ir=e=>(nr.add(e),()=>{nr.delete(e)}),ar=()=>sr().map(e=>tr.get(e)??{uri:e,state:`connecting`}),or=()=>sr(),sr=()=>{try{let e=JSON.parse(localStorage.getItem($n)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}},cr=e=>{try{localStorage.setItem($n,JSON.stringify(e))}catch{}},lr=(e,t)=>{tr.set(e,{uri:e,...t}),rr()},ur=45e3,dr=(e,t)=>Promise.race([e,new Promise((e,n)=>setTimeout(()=>n(Error(t)),ur))]),fr=new Set,pr=new Map,mr=3e4,hr=(e,t)=>{if(!sr().includes(e)||fr.has(e)||pr.has(e))return;tr.get(e)?.state!==`error`&&lr(e,{state:`connecting`});let n=Math.min(er*t,mr),r=setTimeout(()=>{pr.delete(e),gr(e,t+1).catch(()=>{})},n);pr.set(e,r)},gr=async(e,t=1)=>{if(!fr.has(e)){fr.add(e),lr(e,{state:`connecting`});try{let{port:t,closed:n}=await dr(x.connect(e,{protocol:Qn,raw:!0}),`connecting to '${e}' timed out`);n.then(()=>{fr.delete(e),qn(e),hr(e,1)});let r=await dr(Promise.race([Kn(t,e),n.then(()=>({error:`the package closed before the source registered`}))]),`'${e}' connected but never registered its source`);if(`error`in r)throw Error(r.error);lr(e,{state:`connected`,sources:r.ok.sources,rejected:r.ok.rejected})}catch(n){fr.delete(e);let r=n instanceof Error?n.message:String(n);throw console.warn(`Plugin '${e}' failed to connect:`,n),lr(e,{state:`error`,error:r}),hr(e,t+1),n}}},_r=e=>{let t=pr.get(e);t!==void 0&&(clearTimeout(t),pr.delete(e))},vr=async(e,t)=>{let n=await x.install(e,t);return n?(cr([...new Set([...sr(),n.uri])]),await gr(n.uri),n.uri):null},yr=async e=>{cr(sr().filter(t=>t!==e)),_r(e),fr.delete(e),tr.delete(e),qn(e),await x.uninstall(e).catch(()=>{}),rr()},br=async()=>{let e=await x.pick({type:`plugin`,id:`stub`},{multiple:!0,title:`Add stub sources`});for(let t of e)await vr(t.uri).catch(()=>{})};for(let e of sr())gr(e).catch(()=>{});function xr(e){var t=e.forward;return function(e){return Dt(e,t)}}var Sr=function(){return typeof navigator<`u`&&(navigator==null||navigator.product),xr}(),Cr=(e,t)=>{for(var n=0|(t||5381),r=0,i=0|e.length;r<i;r++)n=(n<<5)+n+e.charCodeAt(r);return n},wr=new Set,Tr=new WeakMap,Er=(e,t)=>{if(e===null||wr.has(e))return`null`;if(typeof e!=`object`)return JSON.stringify(e)||``;if(e.toJSON)return Er(e.toJSON(),t);if(Array.isArray(e)){for(var n=`[`,r=0,i=e.length;r<i;r++)n.length>1&&(n+=`,`),n+=Er(e[r],t)||`null`;return n+=`]`}else if(!t&&(kr!==Or&&e instanceof kr||Ar!==Or&&e instanceof Ar))return`null`;var a=Object.keys(e).sort();if(!a.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=Tr.get(e)||Math.random().toString(36).slice(2);return Tr.set(e,o),Er({__key:o},t)}wr.add(e);for(var s=`{`,c=0,l=a.length;c<l;c++){var u=Er(e[a[c]],t);u&&(s.length>1&&(s+=`,`),s+=Er(a[c],t)+`:`+u)}return wr.delete(e),s+=`}`},Dr=(e,t)=>(wr.clear(),Er(e,t||!1)),Or=class{},kr=typeof File<`u`?File:Or,Ar=typeof Blob<`u`?Blob:Or,jr=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,Mr=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,Nr=(e,t)=>t%2==0?e.replace(Mr,`
20
- `):e,Pr=e=>e.split(jr).map(Nr).join(``).trim(),Fr=new Map,Ir=new Map,Lr=e=>{var t;return typeof e==`string`?t=Pr(e):e.loc&&Ir.get(e.__key)===e?t=e.loc.source.body:(t=Fr.get(e)||Pr(Je(e)),Fr.set(e,t)),typeof e!=`string`&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:`gql`,locationOffset:{line:1,column:1}}}),t},Rr=e=>{var t;if(e.documentId)t=Cr(e.documentId);else if(t=Cr(Lr(e)),e.definitions){var n=Vr(e);n&&(t=Cr(`\n# ${n}`,t))}return t},zr=e=>{var t,n;return typeof e==`string`?(t=Rr(e),n=Ir.get(t)||He(e,{noLocation:!0})):(t=e.__key||Rr(e),n=Ir.get(t)||e),n.loc||Lr(n),n.__key=t,Ir.set(t,n),n},Br=(e,t,n)=>{var r=t||{},i=zr(e),a=Dr(r,!0),o=i.__key;return a!==`{}`&&(o=Cr(a,o)),{key:o,query:i,variables:r,extensions:n}},Vr=e=>{for(var t=0,n=e.definitions.length;t<n;t++){var r=e.definitions[t];if(r.kind===Ce.OPERATION_DEFINITION)return r.name?r.name.value:void 0}},Hr=e=>{if(`definitions`in e){for(var t=[],n=0,r=e.definitions.length;n<r;n++){var i=Hr(e.definitions[n]);t.push(i)}return{...e,definitions:t}}if(`directives`in e&&e.directives&&e.directives.length){for(var a=[],o={},s=0,c=e.directives.length;s<c;s++){var l=e.directives[s],u=l.name.value;u[0]===`_`?u=u.slice(1):a.push(l),o[u]=l}e={...e,directives:a,_directives:o}}if(`selectionSet`in e){var d=[],f=e.kind===Ce.OPERATION_DEFINITION;if(e.selectionSet){for(var p=0,m=e.selectionSet.selections.length;p<m;p++){var h=e.selectionSet.selections[p];f||=h.kind===Ce.FIELD&&h.name.value===`__typename`&&!h.alias;var g=Hr(h);d.push(g)}return f||d.push({kind:Ce.FIELD,name:{kind:Ce.NAME,value:`__typename`},_generated:!0}),{...e,selectionSet:{...e.selectionSet,selections:d}}}}return e},Ur=new Map,Wr=e=>{var t=zr(e),n=Ur.get(t.__key);return n||(Ur.set(t.__key,n=Hr(t)),Object.defineProperty(n,"__key",{value:t.__key,enumerable:!1})),n};function Gr(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var Kr=`
21
- https://bit.ly/2XbVrpR#`;function qr(e,t,n){if(!e){var r=t||`Minfied Error #`+n+`
22
- `,i=Error(r+Kr+n);throw i.name=`Graphcache Error`,i}}var Jr={},Yr=e=>e._directives||Jr,Xr=e=>e.name.value,Zr=e=>e.typeCondition.name.value,Qr=e=>e.alias?e.alias.value:e.name.value,$r=[],ei=e=>e.selectionSet?e.selectionSet.selections:$r,ti=e=>e.typeCondition?e.typeCondition.name.value:null,ni=(e,t)=>{var n=null;if(e.arguments)for(var r=0,i=e.arguments.length;r<i;r++){var a=e.arguments[r],o=Ye(a.value,t);o!=null&&(n||={},n[Xr(a)]=o)}return n},ri=(e,t)=>{if(!(!t||!e.variableDefinitions)){for(var n={},r=0,i=e.variableDefinitions.length;r<i;r++){var a=Xr(e.variableDefinitions[r].variable);n[a]=t[a]}return n}},ii=(e,t)=>{var n={};if(!t)return n;if(e.variableDefinitions)for(var r=0,i=e.variableDefinitions.length;r<i;r++){var a=e.variableDefinitions[r],o=Xr(a.variable);n[o]=t[o]===void 0&&a.defaultValue?Ye(a.defaultValue,t):t[o]}for(var s in t)s in n||(n[s]=t[s]);return n};function ai(e){for(var t=0;t<e.definitions.length;t++)if(e.definitions[t].kind===Ce.OPERATION_DEFINITION)return e.definitions[t];qr(!1,``,1)}var oi=e=>{for(var t={},n=0;n<e.definitions.length;n++){var r=e.definitions[n];r.kind===Ce.FRAGMENT_DEFINITION&&(t[Xr(r)]=r)}return t},si=(e,t)=>{var n=Yr(e);if(n.include||n.skip)for(var r in n){var i=n[r];if(i&&(r===`include`||r===`skip`)&&i.arguments&&i.arguments[0]&&Xr(i.arguments[0])===`if`){var a=Ye(i.arguments[0].value,t);return r===`include`?!!a:!a}}return!0},ci=(e,t)=>{var{defer:n}=Yr(e);if(n){for(var r of n.arguments||[])if(Xr(r)===`if`)return!!Ye(r.value,t);return!0}return!1},li=e=>{var{optional:t,required:n}=Yr(e);if(n)return!1;if(t)return!0},ui=`__`,di=(e,t,n,r)=>{var i=mi(e,t,n,r);return!!i&&i.type.kind!==`NON_NULL`},fi=(e,t,n,r)=>{var i=mi(e,t,n,r);if(!i)return!1;var a=i.type.kind===`NON_NULL`?i.type.ofType:i.type;return a.kind===`LIST`&&a.ofType.kind!==`NON_NULL`},pi=(e,t,n)=>{if(!n)return!1;var r=ti(t);return!r||n===r?!0:e.types.has(r)&&e.types.get(r).kind===`OBJECT`?r===n:((function(e,t){qr(e.types.has(t)&&(e.types.get(t).kind===`INTERFACE`||e.types.get(t).kind===`UNION`),``,5)})(e,r),hi(e,n),e.isSubType(r,n))},mi=(e,t,n,r)=>{if(!(n.indexOf(ui)===0||t.indexOf(ui)===0))return hi(e,t),e.types.get(t).fields()[n]};function hi(e,t){qr(e.types.has(t)&&e.types.get(t).kind===`OBJECT`,``,3)}var gi=(e,t)=>t?`${e}(${Dr(t)})`:e,_i=(e,t)=>`${e}.${t}`,vi=e=>{var t=e.indexOf(`(`);return t>-1?{fieldKey:e,fieldName:e.slice(0,t),arguments:JSON.parse(e.slice(t+1,-1))}:{fieldKey:e,fieldName:e,arguments:null}},yi=e=>{var t=e.indexOf(`.`);return{entityKey:e.slice(0,t).replace(/%2e/g,`.`),fieldKey:e.slice(t+1)}},bi=null,xi=null,q=null,Si=null,Ci=null,wi=null,Ti=!1,Ei=!1;function Di(e,t){var n;if(e){if(bi.has(e))return e;n=xi.get(e)}return n??=t?[]:{},e&&xi.set(e,n),bi.add(n),n}var Oi=e=>!!e&&bi.has(e),ki=(e,t,n,r,i)=>{bi=new WeakSet,xi=new WeakMap,Ci=e,q=t,wi=new Set,Ei=!!r,Ti=!!i,n?Ci===`read`?Si=n:r||t.hydrating||t.optimisticOrder.length>1?(!r&&!t.commutativeKeys.has(n)?Ji(t,n):r&&(t.optimisticOrder.indexOf(n)!==-1&&!t.commutativeKeys.has(n)&&t.optimisticOrder.splice(t.optimisticOrder.indexOf(n),1),t.commutativeKeys.delete(n)),Si=n,Yi(t,n)):(Si=null,Zi(t,n)):Si=null},Ai=()=>{var e=q,t=Si;if(Ei=!1,Si=null,!e.hydrating&&t&&e.optimisticOrder.indexOf(t)>-1)for(var n=e.optimisticOrder.length;--n>=0&&e.dirtyKeys.has(e.optimisticOrder[n])&&e.commutativeKeys.has(e.optimisticOrder[n]);)Qi(e.optimisticOrder[n]);bi=null,xi=null,Ci=null,q=null,wi=null,!e.defer&&(e.storage||!e.optimisticOrder.length)&&(e.defer=!0,setTimeout((()=>{ki(`read`,e,null),zi(),ea(),Ai(),e.defer=!1})))},ji=(e,t,n)=>{t&&!n&&e.deferredKeys.delete(t),ki(`write`,e,t,n),Ai()},Mi=new Set,Ni=(e,t,n,r)=>{var i=Si?e.optimistic.get(Si):e.base,a=i.get(t);a===void 0&&i.set(t,a=Object.create(null)),r===void 0&&!Si?delete a[n]:a[n]=r},Pi=(e,t,n)=>{for(var r,i=!Ei&&Ci===`read`&&Si&&q.commutativeKeys.has(Si),a=0,o=q.optimisticOrder.length;a<o;a++){var s=q.optimisticOrder[a],c=e.optimistic.get(s);if(i&&=s!==Si,c&&(!i||!q.commutativeKeys.has(s))&&(!Ei||Ci===`write`||q.commutativeKeys.has(s))&&(r=c.get(t))!==void 0&&n in r)return r[n]}return(r=e.base.get(t))===void 0?void 0:r[n]};function Fi(e){return q.refCount.get(e)||0}var Ii=(e,t)=>{if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)Ii(e[n],t);else typeof e==`string`&&((e,t)=>{var n=Fi(e),r=n+t>0?n+t:0;q.refCount.set(e,r),r?!n&&r&&q.gc.delete(e):q.gc.add(e)})(e,t)},Li=(e,t,n)=>{if(n!==void 0)for(var r in n)t.has(r)||(e.push(vi(r)),t.add(r))},Ri=(e,t,n,r)=>{Li(e,t,r.base.get(n));for(var i=0,a=q.optimisticOrder.length;i<a;i++){var o=r.optimistic.get(q.optimisticOrder[i]);o!==void 0&&Li(e,t,o.get(n))}},zi=()=>{if(!q.optimisticOrder.length){for(var e of q.gc.keys())if(q.gc.delete(e),!(Fi(e)>0)){var t=q.records.base.get(e);q.refCount.delete(e),q.records.base.delete(e);var n=t&&t.__typename;if(n){var r=q.types.get(n);r&&r.delete(e)}var i=q.links.base.get(e);if(i)for(var a in q.links.base.delete(e),i)Ii(i[a],-1)}}},Bi=(e,t)=>{e===q.queryRootKey?t!==void 0&&t!==`__typename`&&wi.add(_i(e,t)):wi.add(e)},Vi=(e,t)=>{!Ei&&q.storage&&q.persist.add(((e,t)=>`${e.replace(/\./g,`%2e`)}.${t}`)(e,t))},Hi=(e,t)=>(Ci===`read`&&Bi(e,t),Pi(q.records,e,t)),Ui=(e,t)=>(Ci===`read`&&Bi(e,t),Pi(q.links,e,t)),Wi=(e,t)=>{var n=q.abstractToConcreteMap.get(e);if(n)n.add(t);else{var r=new Set;r.add(t),q.abstractToConcreteMap.set(e,r)}},Gi=(e,t,n)=>{ta(Pi(q.records,e,t),n)||(Bi(e,t),Vi(e,t)),Ni(q.records,e,t,n)},Ki=(e,t)=>Hi(e,t)!==void 0||Ui(e,t)!==void 0,qi=(e,t,n)=>{var r=Si?q.links.optimistic.get(Si):q.links.base;if(!Si){var i=r&&r.get(e);Ii(i&&i[t],-1),Ii(n,1)}ta(Pi(q.links,e,t),n)||(Bi(e,t),Vi(e,t)),Ni(q.links,e,t,n)},Ji=(e,t,n)=>{var r=e.optimisticOrder.indexOf(t);if(r>-1&&e.optimisticOrder.splice(r,1),n)for(e.deferredKeys.add(t),r=r>-1?r:0;r<e.optimisticOrder.length&&!e.deferredKeys.has(e.optimisticOrder[r])&&(!e.dirtyKeys.has(e.optimisticOrder[r])||!e.commutativeKeys.has(e.optimisticOrder[r]));r++);else e.deferredKeys.delete(t),r>-1&&!e.commutativeKeys.has(t)&&Xi(e,t),r=0;e.optimisticOrder.splice(r,0,t),e.commutativeKeys.add(t)},Yi=(e,t)=>{e.optimisticOrder.indexOf(t)===-1&&e.optimisticOrder.unshift(t),e.dirtyKeys.has(t)||(e.dirtyKeys.add(t),e.links.optimistic.set(t,new Map),e.records.optimistic.set(t,new Map))},Xi=(e,t)=>{e.dirtyKeys.has(t)&&(e.dirtyKeys.delete(t),e.records.optimistic.delete(t),e.links.optimistic.delete(t),e.deferredKeys.delete(t))},Zi=(e,t)=>{var n=e.optimisticOrder.indexOf(t);n>-1&&(e.optimisticOrder.splice(n,1),e.commutativeKeys.delete(t)),Xi(e,t)},Qi=e=>{var t=wi;wi=new Set,Ci=`write`;var n=q.links.optimistic.get(e);if(n)for(var r of n.entries()){var i=r[0],a=r[1];for(var o in a)qi(i,o,a[o])}var s=q.records.optimistic.get(e);if(s)for(var c of s.entries()){var l=c[0],u=c[1];for(var d in u)Gi(l,d,u[d])}wi=t,Zi(q,e)},$i=e=>{var{links:t,records:n}=q,r=[],i=new Set;return Bi(e),Ri(r,i,e,t),Ri(r,i,e,n),r},ea=()=>{if(q.storage){Ei=!0,Ci=`read`;var e={};for(var t of q.persist.keys()){var{entityKey:n,fieldKey:r}=yi(t),i=void 0;(i=Ui(n,r))===void 0?(i=Hi(n,r))===void 0?e[t]=void 0:e[t]=Dr(i):e[t]=`:${Dr(i)}`}Ei=!1,q.storage.writeData(e),q.persist.clear()}};function ta(e,t){return typeof e!=typeof t||e!==t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length?!e.some(((e,n)=>e!==t[n])):!1:!0}var na=null,ra=!1,ia=void 0,aa=e=>e.__internal.path.length>0&&e.__internal.errorMap?e.__internal.errorMap[e.__internal.path.join(`.`)]:void 0,oa=(e,t,n,r,i,a)=>{var o={store:e,variables:t,fragments:n,parent:{__typename:r},parentTypeName:r,parentKey:i,parentFieldKey:``,fieldName:``,error:void 0,partial:!1,hasNext:!1,optimistic:Ei,__internal:{path:[],errorMap:void 0}};if(a&&a.graphQLErrors)for(var s=0;s<a.graphQLErrors.length;s++){var c=a.graphQLErrors[s];c.path&&c.path.length&&(o.__internal.errorMap||(o.__internal.errorMap=Object.create(null)),o.__internal.errorMap[c.path.join(`.`)]=c)}return o},sa=(e,t,n,r,i,a)=>{na=e,e.parent=t,e.parentTypeName=n,e.parentKey=r,e.parentFieldKey=i,e.fieldName=a,e.error=aa(e)},ca=(e,t,n,r,i)=>{if(!t)return!1;var a=ti(e);return!a||t===a?!0:!ei(e).some((e=>e.kind===Ce.FIELD?!Ki(n,gi(Xr(e),ni(e,r))):!1))},la=class{constructor(e,t,n,r,i,a){this.typename=e,this.entityKey=t,this.ctx=a,this.stack=[{selectionSet:i,index:0,defer:n,optional:r}]}next(){for(;this.stack.length>0;){for(var e=this.stack[this.stack.length-1];e.index<e.selectionSet.length;){var t=e.selectionSet[e.index++];if(si(t,this.ctx.variables)){if(t.kind!==Ce.FIELD){var n=t.kind===Ce.INLINE_FRAGMENT?t:this.ctx.fragments[Xr(t)];if(n){var r=!n.typeCondition||(this.ctx.store.schema?pi(this.ctx.store.schema,n,this.typename):this.ctx.store.possibleTypeMap?ua(this.ctx.store.possibleTypeMap,n.typeCondition.name.value,this.typename):Ci===`read`&&da(n.typeCondition.name.value,this.typename)||ca(n,this.typename,this.entityKey,this.ctx.variables,this.ctx.store.logger));if(r||Ci===`write`&&!this.ctx.store.schema){var i=li(t);r&&n.typeCondition&&this.typename!==n.typeCondition.name.value&&Wi(n.typeCondition.name.value,this.typename),this.stack.push(e={selectionSet:ei(n),index:0,defer:e.defer||ci(t,this.ctx.variables),optional:i===void 0?e.optional:i})}}}else if(Ci===`write`||!t._generated)return ra=e.defer,ia=e.optional,t}}this.stack.pop()}}},ua=(e,t,n)=>{if(!n)return!1;if(t===n)return!0;var r=e.get(t);return r&&r.has(n)},da=(e,t)=>{if(!t)return!1;if(e===t)return!0;if((e=>q.types.has(e))(e))return!1;var n=(e=>q.abstractToConcreteMap.get(e)||Mi)(e);return n.size&&n.has(t)},fa=e=>e??null,pa=(e,t)=>{if(!t)return t||null;if(Array.isArray(t)){for(var n=Array(t.length),r=0,i=n.length;r<i;r++)n[r]=pa(e,t[r]);return n}return e.keyOfEntity(t)},ma=(e,t,n,r)=>{var i=Wr(t.query),a=ai(i),o=e.rootFields[a.operation],s=ei(a),c=oa(e,ii(a,t.variables),oi(i),o,o,r),l=o===c.store.rootFields.query?va(c,o,s,n||Di()):ha(c,o,s,n||Di());return{dependencies:wi,partial:c.partial||!l,hasNext:c.hasNext,data:l||null}},ha=(e,t,n,r)=>{if(typeof(e.store.rootNames[t]?t:r.__typename)!=`string`)return r;for(var i=new la(t,t,!1,void 0,n,e),a,o=Ti,s=Di(r);a=i.next();){var c=Qr(a),l=r[c];e.__internal.path.push(c);var u=void 0;u=a.selectionSet&&l!==null?ga(e,ei(a),fa(l)):l,o||=u!==l,u!==void 0&&(s[c]=u),e.__internal.path.pop()}return o?s:r},ga=(e,t,n)=>{if(Array.isArray(n)){for(var r=Array(n.length),i=Ti,a=0,o=n.length;a<o;a++)e.__internal.path.push(a),r[a]=ga(e,t,n[a]),i||=r[a]!==n[a],e.__internal.path.pop();return i?r:n}else if(n===null)return null;var s=e.store.keyOfEntity(n);return s===null?ha(e,n.__typename,t,n):va(e,s,t,n)||null};function _a(e,t,n,r){var i=r.store.resolvers[t],a=i&&i[n],o;for(var s in e){var c=e[s];if(c&&s!==`include`&&s!==`skip`&&r.store.directives[s])return o=r.store.directives[s](ni(c,r.variables)),o}return o||a}var va=(e,t,n,r,i)=>{var{store:a}=e,o=t===a.rootFields.query,s=i&&a.keyOfEntity(i)||t,c=o?t:Hi(s,`__typename`)||i&&i.__typename;if(typeof c==`string`&&!(i&&c!==i.__typename)){for(var l=new la(c,s,!1,void 0,n,e),u=!1,d=!1,f=Ti,p,m=e.partial,h=Di(r);(p=l.next())!==void 0;){var g=Xr(p),_=ni(p,e.variables),v=Qr(p),y=Yr(p),b=_a(y,c,g,e),x=gi(g,_),S=_i(s,x),C=Hi(s,x),w=i?i[g]:void 0;e.__internal.path.push(v);var T=void 0;if(g===`__typename`)T=c;else if(w!==void 0&&p.selectionSet===void 0)T=w;else if(Ci===`read`&&b){var E=h;if(p.selectionSet===void 0&&C!==void 0&&(E={...h,[v]:C,[g]:C}),sa(e,E,c,s,x,g),T=b(E,_||{},a,e),p.selectionSet&&(T=ya(e,c,g,S,ei(p),h[v]===void 0?r[v]:h[v],T,Oi(r))),a.schema&&T===null&&!di(a.schema,c,g,e.store.logger))return}else if(!p.selectionSet)T=C;else if(w!==void 0)T=ya(e,c,g,S,ei(p),h[v]===void 0?r[v]:h[v],w,Oi(r));else{var D=Ui(s,x);D===void 0?typeof C==`object`&&C&&(T=C):T=ba(e,D,c,g,ei(p),h[v]===void 0?r[v]:h[v],Oi(r))}if(!ra&&T===void 0&&(y.optional||ia&&!y.required||aa(e)||!y.required&&a.schema&&di(a.schema,c,g,e.store.logger))?(e.partial=!0,T=null):T===null&&(y.required||!1===ia)?(e.store.logger,T=void 0):u||=g!==`__typename`,e.__internal.path.pop(),f||=T!==r[v],T!==void 0)h[v]=T;else if(ra)d=!0;else{e.store.logger,e.partial=m;return}}return e.partial=e.partial||m,e.hasNext=e.hasNext||d,o&&e.partial&&!u?void 0:f?h:r}},ya=(e,t,n,r,i,a,o,s)=>{if(Array.isArray(o)){for(var{store:c}=e,l=c.schema?fi(c.schema,t,n,e.store.logger):!1,u=e.partial,d=Di(a,!0),f=Ti||!Array.isArray(a)||o.length!==a.length,p=0,m=o.length;p<m;p++){e.__internal.path.push(p);var h=ya(e,t,n,_i(r,`${p}`),i,a?.[p],o[p],s);if(e.__internal.path.pop(),h===void 0&&!l){e.partial=u;return}else e.partial=e.partial||h===void 0&&l,d[p]=h??null,f||=d[p]!==a[p]}return f?d:a}else if(o==null)return o;else if(s&&a===null)return null;else if(xa(o)){var g=a||Di(a);return typeof o==`string`?va(e,o,i,g):va(e,r,i,g,o)}else return},ba=(e,t,n,r,i,a,o)=>{if(Array.isArray(t)){for(var{store:s}=e,c=s.schema?fi(s.schema,n,r,e.store.logger):!1,l=Di(a,!0),u=e.partial,d=Ti||!Array.isArray(a)||t.length!==a.length,f=0,p=t.length;f<p;f++){e.__internal.path.push(f);var m=ba(e,t[f],n,r,i,a?.[f],o);if(e.__internal.path.pop(),m===void 0&&!c){e.partial=u;return}else e.partial=e.partial||m===void 0&&c,l[f]=m||null,d||=l[f]!==a[f]}return d?l:a}else if(t===null||a===null&&o)return null;return va(e,t,i,a||Di(a))},xa=e=>typeof e==`string`||typeof e==`object`&&typeof e.__typename==`string`,Sa=(e,t,n)=>{for(var r=t?[{fieldKey:gi(t,n)}]:$i(e),i=0,a=r.length;i<a;i++){var{fieldKey:o}=r[i];Ui(e,o)===void 0?Gi(e,o,void 0):qi(e,o,void 0)}},Ca=(e,t)=>{for(var n of(e=>q.types.get(e)||Mi)(e))t.includes(n)||Sa(n)},wa=(e,t,n,r)=>{var i=Wr(t.query),a=ai(i),o={data:n||Di(),dependencies:wi},s=e.rootFields[a.operation];return Ta(oa(e,ii(a,t.variables),oi(i),s,s,r),s,ei(a),o.data),o},Ta=(e,t,n,r)=>{var i=e.store.rootNames[t]||`query`,a=!!e.store.rootNames[t],o=a?t:r.__typename;if(!o&&t&&e.optimistic&&(o=Hi(t,`__typename`)),o)!a&&t&&(Gi(t,`__typename`,o),((e,t)=>{var n=q.types.get(e);if(n)n.add(t);else{var r=new Set;r.add(t),q.types.set(e,r)}})(o,t));else return;for(var s=e.store.updates[o],c=new la(o,t||o,!1,void 0,n,e),l;l=c.next();){var u=Xr(l),d=ni(l,e.variables),f=gi(u,d),p=Qr(l),m=r[e.optimistic?u:p];if(!(u===`__typename`||m===void 0&&(ra||e.optimistic&&i===`query`))){e.__internal.path.push(p);var h=void 0;if(e.optimistic&&i===`mutation`){if(!(h=e.store.optimisticMutations[u]))continue}else e.optimistic&&typeof m==`function`&&(h=m);if(h&&(sa(e,r,o,t||o,f,u),m=fa(h(d||{},e.store,e))),m!==void 0){if(l.selectionSet)if(t&&i===`query`){var g=_i(t,f),_=Ea(e,ei(l),fa(m),g,e.optimistic?Ui(t||o,f):void 0);qi(t||o,f,_)}else Ea(e,ei(l),fa(m));else t&&i===`query`&&Gi(t||o,f,m!==null||!aa(e)?m:void 0);var v=s&&s[u];if(v)sa(e,r,o,t||o,f,u),r[u]=m,v(r,d||{},e.store,e);else if(o===e.store.rootFields.mutation&&!e.optimistic){if(m&&Array.isArray(m))for(var y=m.map((t=>e.store.keyOfEntity(t)||``)),b=0,x=m.length;b<x;b++){var S=y[b];if(S&&m[b].__typename){var C=Hi(S,`__typename`),w=Fi(S);C&&!w&&Ca(m[b].__typename,y)}}else if(m&&typeof m==`object`){var T=e.store.keyOfEntity(m);if(T){var E=Hi(T,`__typename`),D=Fi(T);(!E||!D)&&m.__typename&&Ca(m.__typename,[T])}}}e.__internal.path.pop()}}}},Ea=(e,t,n,r,i)=>{if(Array.isArray(n)){for(var a=Array(n.length),o=0,s=n.length;o<s;o++){e.__internal.path.push(o);var c=r?_i(r,`${o}`):void 0;a[o]=Ea(e,t,n[o],c,i?.[o]),e.__internal.path.pop()}return a}else if(n===null)return aa(e)?void 0:null;var l=e.store.keyOfEntity(n)||(typeof i==`string`?i:null);n.__typename;var u=l||r;return Ta(e,u,t,n),u||null},Da=class{constructor(e){e||={},this.logger=e.logger,this.resolvers=e.resolvers||{},this.directives=e.directives||{},this.optimisticMutations=e.optimistic||{},this.keys=e.keys||{},this.globalIDs=Array.isArray(e.globalIDs)?new Set(e.globalIDs):!!e.globalIDs;var t=`Query`,n=`Mutation`,r=`Subscription`;if(e.schema){var i=(({__schema:e})=>{var t=new Map,n=e=>{var t;return()=>{if(!t){t={};for(var n=0;n<e.length;n++)t[e[n].name]=e[n]}return t}},r=e=>{switch(e.kind){case`OBJECT`:case`INTERFACE`:return{name:e.name,kind:e.kind,interfaces:n(e.interfaces||[]),fields:n(e.fields.map((e=>({name:e.name,type:e.type,args:n(e.args)}))))};case`UNION`:return{name:e.name,kind:e.kind,types:n(e.possibleTypes||[])}}},i={query:e.queryType?e.queryType.name:null,mutation:e.mutationType?e.mutationType.name:null,subscription:e.subscriptionType?e.subscriptionType.name:null,types:void 0,isSubType(e,n){var r=t.get(e),i=t.get(n);return!r||!i?!1:r.kind===`UNION`?!!r.types()[n]:r.kind!==`OBJECT`&&i.kind===`OBJECT`?!!i.interfaces()[e]:e===n}};if(e.types){i.types=t;for(var a=0;a<e.types.length;a++){var o=e.types[a];if(o&&o.name){var s=r(o);s&&t.set(o.name,s)}}}return i})(e.schema);t=i.query||t,n=i.mutation||n,r=i.subscription||r,i.types&&(this.schema=i)}if(!this.schema&&e.possibleTypes){this.possibleTypeMap=new Map;for(var a of Object.entries(e.possibleTypes)){var[o,s]=a;this.possibleTypeMap.set(o,new Set(s))}}this.updates=e.updates||{},this.rootFields={query:t,mutation:n,subscription:r},this.rootNames={[t]:`query`,[n]:`mutation`,[r]:`subscription`},this.data=(c=t,{hydrating:!1,defer:!1,gc:new Set,types:new Map,persist:new Set,queryRootKey:c,refCount:new Map,links:{optimistic:new Map,base:new Map},abstractToConcreteMap:new Map,records:{optimistic:new Map,base:new Map},deferredKeys:new Set,commutativeKeys:new Set,dirtyKeys:new Set,optimisticOrder:[],storage:null});var c;this.schema}keyOfField(e,t){return gi(e,t)}keyOfEntity(e){if(na&&e===na.parent)return na.parentKey;if(e==null||typeof e==`string`)return e||null;if(!e.__typename)return null;if(this.rootNames[e.__typename])return e.__typename;var t=null;this.keys[e.__typename]?t=this.keys[e.__typename](e)||null:e.id==null?e._id!=null&&(t=`${e._id}`):t=`${e.id}`;var n=e.__typename;return!0===this.globalIDs||this.globalIDs&&this.globalIDs.has(n)||!t?t:`${n}:${t}`}resolve(e,t,n){var r=this.keyOfEntity(e);if(r){var i=gi(t,n),a=Hi(r,i);if(a!==void 0)return a;var o=Ui(r,i);return o!==void 0&&(o=pa(this,o)),o}}invalidate(e,t,n){var r=this.keyOfEntity(e);e&&typeof e==`string`&&!t&&!n&&!this.resolve(e,`__typename`)?Ca(e,[]):(qr(r,``,19),Sa(r,t,n))}inspectFields(e){var t=this.keyOfEntity(e);return t?$i(t):[]}updateQuery(e,t){var n=Br(e.query,e.variables),r=t(this.readQuery(n));r!==null&&wa(this,n,r,void 0)}readQuery(e){var t=Br(e.query,e.variables);return ma(this,t,void 0,void 0).data}readFragment(e,t,n,r){return((e,t,n,r,i)=>{var a=oi(t),o;if(i){if(!(o=a[i]))return null}else if(!(o=a[Object.keys(a)[0]]))return null;var s=Zr(o);typeof n!=`string`&&!n.__typename&&(n.__typename=s);var c=e.keyOfEntity(n);return c&&va(oa(e,r||{},a,s,c,void 0),c,ei(o),Di())||null})(this,Wr(e),t,n,r)}writeFragment(e,t,n,r){((e,t,n,r,i)=>{var a=oi(t),o;if(i){if(!(o=a[i]))return null}else if(!(o=a[Object.keys(a)[0]]))return null;var s=Zr(o),c={__typename:s,...n},l=e.keyOfEntity(c);l&&Ta(oa(e,r||{},a,s,l,void 0),l,ei(o),c)})(this,Wr(e),t,n,r)}link(e,t,...n){var r=n.length===2?n[0]:null,i=n.length===2?n[1]:n[0],a=this.keyOfEntity(e);a&&qi(a,gi(t,r),pa(this,i))}},Oa=(e,t)=>Gr(e.kind,e,{...e.context,meta:{...e.context.meta,...t}}),ka=(e,t)=>Gr(e.kind,e,{...e.context,requestPolicy:t}),Aa=(e=>({forward:t,client:n,dispatchDebug:r})=>{var i=new Da(e);e&&e.storage&&(i.data.hydrating=!0,e.storage.readData().then((t=>{((e,t,n)=>{for(var r in ki(`write`,e,null),n){var i=n[r];if(i!==void 0){var{entityKey:a,fieldKey:o}=yi(r);i[0]===`:`?Ui(a,o)===void 0&&qi(a,o,JSON.parse(i.slice(1))):Hi(a,o)===void 0&&Gi(a,o,JSON.parse(i))}}e.storage=t,e.hydrating=!1,Ai()})(i.data,e.storage,t),e.storage.onCacheHydrated&&e.storage.onCacheHydrated()})));var a=new Map,o=[],s=new Map,c=new Map,l=new Set,u=new Set,d=new Map,f=new Set,p=new Set,m=e=>{for(var t of e.values())if(l.has(t))return!0;return!1},h=(e,t)=>{if(t)for(var n of t.values()){var r=d.get(n);if(r)for(var i of r.values())e.add(i)}},g=(e,t,r)=>{for(var i of t.values())if(i!==e.key){var a=s.get(i);if(a){e.kind===`query`&&p.add(i);var o=`cache-first`;u.has(i)&&(u.delete(i),o=`cache-and-network`),n.reexecuteOperation(ka(a,o))}}if(!r){var c=f;f=p,e.kind===`query`&&f.add(e.key),(p=c).clear()}},_=e=>{var t=!1;if(e.kind===`query`)Ji(i.data,e.key),s.set(e.key,e);else if(e.kind===`teardown`)return s.delete(e.key),c.delete(e.key),f.delete(e.key),ji(i.data,e.key),e;else if(e.kind===`mutation`&&e.context.requestPolicy!==`network-only`){s.set(e.key,e),ki(`write`,i.data,e.key,!0,!1);var{dependencies:n}=wa(i,e,void 0,void 0);if(Ai(),n.size){for(var r of n.values())l.add(r);a.set(e.key,n);var o=new Set;h(o,n),g(e,o,!0),t=!0}}return Gr(e.kind,{key:e.key,query:Wr(e.query),variables:e.variables?ri(ai(e.query),e.variables):e.variables},{...e.context,optimistic:t})},v=(e,t)=>{for(var n of t.values()){var r=d.get(n);r||d.set(n,r=new Set),r.add(e.key)}},y=e=>{ki(`read`,i.data,void 0,!1,!1);var t=ma(i,e,c.get(e.key),void 0);Ai();var n=t.data?!t.partial&&!t.hasNext?`hit`:`partial`:`miss`;return c.set(e.key,t.data),s.set(e.key,e),v(e,t.dependencies),{outcome:n,operation:e,data:t.data,dependencies:t.dependencies,hasNext:t.hasNext}},b=(e,t)=>{var n=s.get(e.operation.key)||e.operation;n.kind===`mutation`&&(h(t,a.get(n.key)),a.delete(n.key)),(n.kind===`subscription`||e.hasNext)&&Ji(i.data,n.key,!0);var r,o=e.data;if(o){ki(`write`,i.data,n.key,!1,!1);var l=wa(i,n,o,e.error).dependencies;Ai(),h(t,l);var u=n.kind===`query`?c.get(n.key):null;ki(`read`,i.data,n.key,!1,u!==o);var d=ma(i,n,u||o,e.error);Ai(),o=d.data,n.kind===`query`&&(h(t,r=d.dependencies),c.set(n.key,o))}else ji(i.data,n.key);return r&&v(e.operation,r),{operation:n,data:o,error:e.error,extensions:e.extensions,hasNext:e.hasNext,stale:e.stale}};return e=>{var r=ut(rt(y)(nt((e=>e.kind===`query`&&e.context.requestPolicy!==`network-only`))(e))),c=nt((e=>e.kind!==`query`||e.context.requestPolicy===`network-only`))(e),d=rt((e=>Oa(e.operation,{cacheOutcome:`miss`})))(nt((e=>e.outcome===`miss`&&e.operation.context.requestPolicy!==`cache-only`&&!m(e.dependencies)&&!f.has(e.operation.key)))(r)),p=rt((e=>{var{requestPolicy:t}=e.operation.context,r=t!==`cache-only`&&(e.hasNext||t===`cache-and-network`||t===`cache-first`&&e.outcome===`partial`&&!f.has(e.operation.key)),a=t!==`cache-only`&&(r||e.outcome===`partial`&&f.has(e.operation.key)&&((o=i.data).commutativeKeys.has(c=e.operation.key)||o.optimisticOrder.indexOf(c)>-1)),o,c,l={operation:Oa(e.operation,{cacheOutcome:e.outcome}),data:e.data,error:e.error,extensions:e.extensions,stale:a&&!e.hasNext,hasNext:r&&e.hasNext};return r&&(m(e.dependencies)?t===`cache-and-network`&&u.add(e.operation.key):n.reexecuteOperation(ka(s.get(e.operation.key)||e.operation,`network-only`))),l}))(nt((e=>e.outcome!==`miss`||e.operation.context.requestPolicy===`cache-only`))(r)),h=t(rt(_)(ot([c,d])));return ot([rt((e=>{var t=new Set,n=b(e,t);return g(e.operation,t,!1),n}))(nt((e=>!a.has(e.operation.key)))(h)),it((e=>{if(o.push(e)<a.size)return St;for(var t=0;t<o.length;t++)Ji(i.data,o[t].operation.key);l.clear();for(var n=[],r=new Set,s;s=o.shift();)n.push(b(s,r));return g(e.operation,r,!1),vt(n)}))(nt((e=>a.has(e.operation.key)))(h)),p])}})({schema:{__schema:JSON.parse(`{"queryType":{"name":"Query","kind":"OBJECT"},"mutationType":{"name":"Mutation","kind":"OBJECT"},"subscriptionType":{"name":"Subscription","kind":"OBJECT"},"types":[{"kind":"OBJECT","name":"Episode","fields":[{"name":"_id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"absoluteEpisodeNumber","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"absoluteNumber","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"descriptions","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"EpisodeDescription","ofType":null}}}},"args":[{"name":"input","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"embedUrl","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"episodeNumber","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"handles","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"EpisodeHandle","ofType":null}}}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"mediaUri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"origin","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"relativeNumber","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"releaseDate","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"runtime","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"seasonNumber","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"shortDescriptions","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"EpisodeShortDescription","ofType":null}}}},"args":[{"name":"input","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"thumbnails","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"EpisodeThumbnail","ofType":null}}}},"args":[]},{"name":"titles","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"EpisodeTitle","ofType":null}}}},"args":[]},{"name":"uri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"url","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"EpisodeDescription","fields":[{"name":"description","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"EpisodeHandle","fields":[{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Episode","ofType":null}},"args":[]},{"name":"relation","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"EpisodeShortDescription","fields":[{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"shortDescription","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"EpisodeThumbnail","fields":[{"name":"color","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"height","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"language","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"url","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"width","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"EpisodeTitle","fields":[{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"title","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Media","fields":[{"name":"_id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"averageScore","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"banners","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaBanner","ofType":null}}}},"args":[]},{"name":"categories","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"covers","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaCover","ofType":null}}}},"args":[]},{"name":"descriptions","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaDescription","ofType":null}}}},"args":[{"name":"input","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"endDate","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"episodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"episodes","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Episode","ofType":null}}}},"args":[]},{"name":"franchise","type":{"kind":"OBJECT","name":"MediaFranchise","ofType":null},"args":[]},{"name":"genres","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"handles","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaHandle","ofType":null}}}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"isAdult","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"nextAiringEpisode","type":{"kind":"OBJECT","name":"MediaAiringEpisode","ofType":null},"args":[]},{"name":"origin","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"popularity","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"relations","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaRelationEdge","ofType":null}}}},"args":[]},{"name":"scope","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"season","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"seasonYear","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"shortDescriptions","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaShortDescription","ofType":null}}}},"args":[{"name":"input","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"startDate","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"status","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"tags","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"titles","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaTitle","ofType":null}}}},"args":[]},{"name":"trailers","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaTrailer","ofType":null}}}},"args":[]},{"name":"type","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"uri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"url","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaAiringEpisode","fields":[{"name":"airingAt","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"episodeNumber","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaBanner","fields":[{"name":"color","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"height","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"language","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"url","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"width","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaCover","fields":[{"name":"color","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"height","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"language","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"url","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"width","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaDescription","fields":[{"name":"description","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaFranchise","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaFranchiseEdge","ofType":null}}}},"args":[]},{"name":"nodes","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaFranchiseNode","ofType":null}}}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaFranchiseEdge","fields":[{"name":"from","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"relation","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"to","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaFranchiseNode","fields":[{"name":"covers","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaCover","ofType":null}}}},"args":[]},{"name":"episodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"format","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"startDate","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"status","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"titles","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaTitle","ofType":null}}}},"args":[]},{"name":"uri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaHandle","fields":[{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Media","ofType":null}},"args":[]},{"name":"relation","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaPage","fields":[{"name":"afterCurrentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"beforeCurrentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"currentPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"currentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"firstPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"lastPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"nextPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"nodes","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Media","ofType":null}}}},"args":[]},{"name":"previousPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"totalNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaRelationEdge","fields":[{"name":"format","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Media","ofType":null}},"args":[]},{"name":"relation","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaShortDescription","fields":[{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"shortDescription","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaTitle","fields":[{"name":"language","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"score","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"title","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"MediaTrailer","fields":[{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"language","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"origin","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"thumbnail","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"uri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"url","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Mutation","fields":[{"name":"_empty","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Origin","fields":[{"name":"color","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"icon","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"isApiOnly","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"name","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"url","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"OriginPage","fields":[{"name":"afterCurrentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"beforeCurrentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"currentPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"currentPageNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"firstPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"lastPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"nextPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"nodes","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Origin","ofType":null}}}},"args":[]},{"name":"previousPageCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"totalNodeCount","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PlaybackSource","fields":[{"name":"Episode","type":{"kind":"OBJECT","name":"Episode","ofType":null},"args":[]},{"name":"data","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"origin","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"type","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"uri","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"url","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Query","fields":[{"name":"_empty","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Subscription","fields":[{"name":"_empty","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"media","type":{"kind":"OBJECT","name":"Media","ofType":null},"args":[{"name":"input","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"mediaPage","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"MediaPage","ofType":null}},"args":[{"name":"input","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"origin","type":{"kind":"OBJECT","name":"Origin","ofType":null},"args":[{"name":"input","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"originPage","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"OriginPage","ofType":null}},"args":[{"name":"input","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"similarMedia","type":{"kind":"OBJECT","name":"Media","ofType":null},"args":[{"name":"input","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]}],"interfaces":[]},{"kind":"SCALAR","name":"Any"}],"directives":[]}`)},keys:{Media:e=>e._id,MediaHandle:()=>null,MediaRelationEdge:()=>null,MediaFranchise:()=>null,MediaFranchiseNode:()=>null,MediaFranchiseEdge:()=>null,EpisodeHandle:()=>null,MediaTitle:()=>null,MediaDescription:()=>null,MediaShortDescription:()=>null,MediaCover:()=>null,MediaBanner:()=>null,MediaAiringEpisode:()=>null,MediaTrailer:e=>e.uri,Episode:e=>e._id,EpisodeTitle:()=>null,EpisodeDescription:()=>null,EpisodeShortDescription:()=>null,EpisodeThumbnail:()=>null,PlaybackSource:e=>e.uri},resolvers:{}}),ja=new yn({url:`http://d/graphql`,exchanges:[_n({onError(e,t){for(let n of e.graphQLErrors)console.error(Error(n.message,{cause:`GQL Error originated from ${t.query.definitions.find(e=>e.kind===`OperationDefinition`)?.name?.value}`}))}}),Sr,Aa,hn],fetchSubscriptions:!0,fetch:async(e,t)=>Wn(e,t)});function Ma(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var Na=t((t=>{var n=(R(),e(_e));function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;t.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Pa=t(((e,t)=>{t.exports=Na()}));R();var Fa=Pa(),Ia=de,La=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?se:H,Ra=Ia||La,za=e=>{let t=z([e,(...e)=>t[0](...e)]).current;return Ra(()=>{t[0]=e}),t[1]},Ba=`popstate`,Va=`pushState`,Ha=`replaceState`,Ua=[Ba,Va,Ha,`hashchange`],Wa=e=>{for(let t of Ua)addEventListener(t,e);return()=>{for(let t of Ua)removeEventListener(t,e)}},Ga=(e,t)=>(0,Fa.useSyncExternalStore)(Wa,e,t),Ka=()=>location.search,qa=({ssrSearch:e=``}={})=>Ga(Ka,()=>e),Ja=()=>location.pathname,Ya=({ssrPath:e}={})=>Ga(Ja,e?()=>e:Ja),Xa=(e,{replace:t=!1,state:n=null}={})=>history[t?Ha:Va](n,``,e),Za=(e={})=>[Ya(e),Xa],Qa=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[Qa]===void 0){for(let e of[Va,Ha]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,Qa,{value:!0})}var $a=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?`~`+t:t.slice(e.length)||`/`,eo=(e=``)=>e===`/`?``:e,to=(e,t)=>e[0]===`~`?e.slice(1):eo(t)+e,no=(e=``,t)=>$a(io(eo(e)),io(t)),ro=e=>e[0]===`?`?e.slice(1):e,io=e=>{try{return decodeURI(e)}catch{return e}},ao=e=>io(ro(e)),oo={hook:Za,searchHook:qa,parser:Ma,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},so=ne(oo),co=()=>F(so),lo={},uo=ne(lo),fo=()=>F(uo),po=e=>{let[t,n]=e.hook(e);return[no(e.base,t),za((t,r)=>n(to(t,e.base),r))]},mo=()=>po(co()),ho=()=>{let e=co();return ao(e.searchHook(e))},go=(e,t,n,r)=>{let{pattern:i,keys:a}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||`*`,r),o=i.exec(n)||[],[s,...c]=o;return s===void 0?[!1,null]:[!0,(()=>{let e=a===!1?o.groups:Object.fromEntries(a.map((e,t)=>[e,c[t]])),t={...c};return e&&Object.assign(t,e),t})(),...r?[s]:[]]},_o=e=>go(co().parser,e,mo()[0]),vo=({children:e,...t})=>{let n=co(),r=t.hook?oo:n,i=r,[a,o]=t.ssrPath?.split(`?`)??[];o&&(t.ssrSearch=o,t.ssrPath=a),t.hrefs=t.hrefs??t.hook?.hrefs;let s=z({}),c=s.current,l=c;for(let e in r){let n=e===`base`?r[e]+(t[e]||``):t[e]||r[e];c===l&&n!==l[e]&&(s.current=l={...l}),l[e]=n,(n!==r[e]||n!==i[e])&&(i=l)}return ie(so.Provider,{value:i,children:e})},yo=({children:e,component:t},n)=>t?ie(t,{params:n}):typeof e==`function`?e(n):e,bo=e=>{let t=z(lo),n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some(([e,t])=>t!==n[e])?e:n},xo=({path:e,nest:t,match:n,...r})=>{let i=co(),[a]=po(i),[o,s,c]=n??go(i.parser,e,a,t),l=bo({...fo(),...s});if(!o)return null;let u=c?ie(vo,{base:c},yo(r,l)):yo(r,l);return ie(uo.Provider,{value:l,children:u})},J=he((e,t)=>{let n=co(),[r,i]=po(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,...p}=e,m=za(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),h=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n);return c&&me(l)?oe(l,{onClick:m,href:h}):ie(`a`,{...p,onClick:m,href:h,className:u?.call?u(r===o):u,children:l,ref:t})}),So=e=>Array.isArray(e)?e.flatMap(e=>So(e&&e.type===te?e.props.children:e)):[e],Co=({children:e,location:t})=>{let n=co(),[r]=po(n);for(let i of So(e)){let e=0;if(me(i)&&(e=go(n.parser,i.props.path,t||r,i.props.nest))[0])return oe(i,{match:e})}return null},wo=e=>{let{to:t,href:n=t}=e,r=co(),[,i]=po(r),a=za(()=>i(t||n,e)),{ssrContext:o}=r;return La(()=>{a()},[]),o&&(o.redirectTo=t),null},Y=function(e){return e.HOME=`HOME`,e.MEDIA=`MEDIA`,e.MEDIA_EPISODE=`MEDIA_EPISODE`,e.SEARCH=`SEARCH`,e.SEARCH_LEGACY=`SEARCH_LEGACY`,e.LEGAL=`LEGAL`,e.PRIVACY=`PRIVACY`,e.SETTINGS=`SETTINGS`,e.WATCH=`WATCH`,e.PARTY=`PARTY`,e.LOGIN_CALLBACK=`LOGIN_CALLBACK`,e}({}),To={HOME:()=>`/`,MEDIA:({uri:e})=>`/media/${e}`,MEDIA_EPISODE:({uri:e,mediaUri:t})=>`/media/${e}/${t}`,SEARCH:()=>`/search`,SEARCH_LEGACY:({query:e})=>`/search/${encodeURIComponent(e)}`,LEGAL:()=>`/legal`,PRIVACY:()=>`/privacy`,SETTINGS:()=>`/settings`,WATCH:({mediaUri:e,episodeUri:t,sourceUri:n})=>`/watch/${e}/${t}${n?`/${n}`:``}`,PARTY:()=>`/party`,LOGIN_CALLBACK:()=>`/login/callback`},Eo={HOME:`/`,MEDIA:`/media/:uri`,MEDIA_EPISODE:`/media/:uri/:mediaUri`,SEARCH:`/search`,SEARCH_LEGACY:`/search/:query`,LEGAL:`/legal`,PRIVACY:`/privacy`,SETTINGS:`/settings`,WATCH:`/watch/:mediaUri/:episodeUri/:sourceUri?`,PARTY:`/party`,LOGIN_CALLBACK:`/login/callback`},Do=e=>Eo[e],X=(e,t)=>To[e](t),Oo=function(e){return e.Anime=`ANIME`,e.Movie=`MOVIE`,e.Series=`SERIES`,e}({}),ko=function(e){return e.Html=`HTML`,e.Text=`TEXT`,e}({}),Ao=function(e){return e.Fall=`FALL`,e.Spring=`SPRING`,e.Summer=`SUMMER`,e.Winter=`WINTER`,e}({}),jo=function(e){return e.Popularity=`POPULARITY`,e.PopularityDesc=`POPULARITY_DESC`,e}({}),Mo=function(e){return e.Cancelled=`CANCELLED`,e.Finished=`FINISHED`,e.Hiatus=`HIATUS`,e.NotYetReleased=`NOT_YET_RELEASED`,e.Releasing=`RELEASING`,e}({}),No=function(e){return e.Anime=`ANIME`,e.LiveAction=`LIVE_ACTION`,e.Movie=`MOVIE`,e.Ona=`ONA`,e.Ova=`OVA`,e.Special=`SPECIAL`,e.Tv=`TV`,e.TvShort=`TV_SHORT`,e}({}),Po=function(e){return e.IsApiOnly=`IS_API_ONLY`,e.IsNotApiOnly=`IS_NOT_API_ONLY`,e}({}),Fo={kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`EpisodeFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Episode`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}}]}}]}}]}}]},Io={kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]},Lo={kind:`Document`,definitions:[{kind:`FragmentDefinition`,name:{kind:`Name`,value:`OriginFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Origin`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`name`}},{kind:`Field`,name:{kind:`Name`,value:`icon`}},{kind:`Field`,name:{kind:`Name`,value:`color`}},{kind:`Field`,name:{kind:`Name`,value:`isApiOnly`}}]}}]},Ro={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetReleasingMediaPage`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaPageInput`}}}},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaShortDescriptionInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`mediaPage`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`nodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`score`}},{kind:`Field`,name:{kind:`Name`,value:`episodeCount`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`score`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}},{kind:`Field`,name:{kind:`Name`,value:`covers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`banners`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`trailers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`thumbnail`}}]}},{kind:`Field`,name:{kind:`Name`,value:`popularity`}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]},zo={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetMediaModal`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaInput`}}}},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`descriptionInput`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaDescriptionInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`media`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`score`}}]}},{kind:`Field`,name:{kind:`Name`,value:`descriptions`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`descriptionInput`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`description`}}]}},{kind:`Field`,name:{kind:`Name`,value:`covers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`banners`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`trailers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`thumbnail`}}]}},{kind:`Field`,name:{kind:`Name`,value:`popularity`}},{kind:`Field`,name:{kind:`Name`,value:`categories`}},{kind:`Field`,name:{kind:`Name`,value:`franchise`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`nodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`format`}},{kind:`Field`,name:{kind:`Name`,value:`status`}},{kind:`Field`,name:{kind:`Name`,value:`episodeCount`}},{kind:`Field`,name:{kind:`Name`,value:`startDate`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`edges`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`from`}},{kind:`Field`,name:{kind:`Name`,value:`to`}},{kind:`Field`,name:{kind:`Name`,value:`relation`}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`relations`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`format`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`status`}},{kind:`Field`,name:{kind:`Name`,value:`episodeCount`}},{kind:`Field`,name:{kind:`Name`,value:`startDate`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`covers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`color`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}},{kind:`Field`,name:{kind:`Name`,value:`releaseDate`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}},{kind:`Field`,name:{kind:`Name`,value:`thumbnails`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}},{kind:`Field`,name:{kind:`Name`,value:`releaseDate`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}},{kind:`Field`,name:{kind:`Name`,value:`thumbnails`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`episodeCount`}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`EpisodeFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Episode`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}}]}}]}}]}}]},Bo={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetMediaModalOrigins`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`OriginPageInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`originPage`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`nodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`OriginFragment`}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`OriginFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Origin`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`name`}},{kind:`Field`,name:{kind:`Name`,value:`icon`}},{kind:`Field`,name:{kind:`Name`,value:`color`}},{kind:`Field`,name:{kind:`Name`,value:`isApiOnly`}}]}}]},Vo={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetTheatherMedia`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaInput`}}}},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaShortDescriptionInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`media`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`score`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}},{kind:`Field`,name:{kind:`Name`,value:`covers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`banners`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`trailers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`thumbnail`}}]}},{kind:`Field`,name:{kind:`Name`,value:`popularity`}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]},Ho={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`SearchMediaPage`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaPageInput`}}}},{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaShortDescriptionInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`mediaPage`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`nodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`score`}},{kind:`Field`,name:{kind:`Name`,value:`episodeCount`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`title`}},{kind:`Field`,name:{kind:`Name`,value:`score`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`shortDescriptionInput`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}},{kind:`Field`,name:{kind:`Name`,value:`covers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`color`}}]}},{kind:`Field`,name:{kind:`Name`,value:`banners`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`trailers`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`thumbnail`}}]}},{kind:`Field`,name:{kind:`Name`,value:`popularity`}},{kind:`Field`,name:{kind:`Name`,value:`genres`}},{kind:`Field`,name:{kind:`Name`,value:`tags`}},{kind:`Field`,name:{kind:`Name`,value:`averageScore`}},{kind:`Field`,name:{kind:`Name`,value:`status`}},{kind:`Field`,name:{kind:`Name`,value:`type`}},{kind:`Field`,name:{kind:`Name`,value:`season`}},{kind:`Field`,name:{kind:`Name`,value:`seasonYear`}},{kind:`Field`,name:{kind:`Name`,value:`nextAiringEpisode`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}},{kind:`Field`,name:{kind:`Name`,value:`airingAt`}}]}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]},Uo={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetWatchMedia`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`MediaInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`media`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`thumbnails`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`url`}}]}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`embedUrl`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}},{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}},{kind:`Field`,name:{kind:`Name`,value:`titles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`title`}}]}},{kind:`Field`,name:{kind:`Name`,value:`shortDescriptions`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`language`}},{kind:`Field`,name:{kind:`Name`,value:`shortDescription`}}]}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`MediaFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}}]}}]}}]}},{kind:`Field`,name:{kind:`Name`,value:`episodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`FragmentSpread`,name:{kind:`Name`,value:`EpisodeFragment`}},{kind:`Field`,name:{kind:`Name`,value:`episodeNumber`}}]}}]}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`EpisodeFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Episode`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`mediaUri`}}]}}]}}]}},{kind:`FragmentDefinition`,name:{kind:`Name`,value:`MediaFragment`},typeCondition:{kind:`NamedType`,name:{kind:`Name`,value:`Media`}},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`handles`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`relation`}},{kind:`Field`,name:{kind:`Name`,value:`node`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`_id`}},{kind:`Field`,name:{kind:`Name`,value:`uri`}},{kind:`Field`,name:{kind:`Name`,value:`origin`}},{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}}]}}]}}]}}]},Wo={kind:`Document`,definitions:[{kind:`OperationDefinition`,operation:`subscription`,name:{kind:`Name`,value:`GetWatchOrigins`},variableDefinitions:[{kind:`VariableDefinition`,variable:{kind:`Variable`,name:{kind:`Name`,value:`input`}},type:{kind:`NonNullType`,type:{kind:`NamedType`,name:{kind:`Name`,value:`OriginPageInput`}}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`originPage`},arguments:[{kind:`Argument`,name:{kind:`Name`,value:`input`},value:{kind:`Variable`,name:{kind:`Name`,value:`input`}}}],selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`nodes`},selectionSet:{kind:`SelectionSet`,selections:[{kind:`Field`,name:{kind:`Name`,value:`id`}},{kind:`Field`,name:{kind:`Name`,value:`url`}},{kind:`Field`,name:{kind:`Name`,value:`name`}},{kind:`Field`,name:{kind:`Name`,value:`icon`}},{kind:`Field`,name:{kind:`Name`,value:`color`}},{kind:`Field`,name:{kind:`Name`,value:`isApiOnly`}}]}}]}}]}}]},Go={query:`q`,category:`category`,status:`status`,season:`season`,year:`year`,format:`format`,genre:`genre`,tag:`tag`},Ko=[{value:No.Tv,label:`TV Show`},{value:No.Movie,label:`Movie`},{value:No.TvShort,label:`TV Short`},{value:No.Special,label:`Special`},{value:No.Ova,label:`OVA`},{value:No.Ona,label:`ONA`}],qo=[{value:Mo.Releasing,label:`Airing`},{value:Mo.Finished,label:`Finished`},{value:Mo.NotYetReleased,label:`Not yet aired`},{value:Mo.Cancelled,label:`Cancelled`},{value:Mo.Hiatus,label:`Hiatus`}],Jo=[{value:Ao.Winter,label:`Winter`},{value:Ao.Spring,label:`Spring`},{value:Ao.Summer,label:`Summer`},{value:Ao.Fall,label:`Fall`}],Yo=[{value:Oo.Anime,label:`Anime`},{value:Oo.Series,label:`Series`},{value:Oo.Movie,label:`Movies`}],Xo=[`Action`,`Adventure`,`Comedy`,`Drama`,`Ecchi`,`Fantasy`,`Horror`,`Mahou Shoujo`,`Mecha`,`Music`,`Mystery`,`Psychological`,`Romance`,`Sci-Fi`,`Slice of Life`,`Sports`,`Supernatural`,`Thriller`],Zo=new Set(Xo.map(e=>e.toLowerCase())),Qo=e=>Zo.has(e.trim().toLowerCase()),$o=(e,t)=>e.find(e=>e===t)??null,es=(e,t)=>t.map(t=>$o(e,t)).filter(e=>e!==null),ts=e=>Jo.map(e=>e.value).find(t=>t===e)??null,ns=Ko.map(e=>e.value),rs=qo.map(e=>e.value),is=Jo.map(e=>e.value),as=Yo.map(e=>e.value),os=1917,ss=(e=new Date)=>e.getFullYear()+5,cs=(e,t=new Date)=>{if(!e||!/^\d{4}$/.test(e))return null;let n=Number(e);return n>=1917&&n<=ss(t)?n:null},ls=(e,t=new Date)=>{let n=new URLSearchParams(e);return{query:(n.get(Go.query)??``).trim(),category:$o(as,n.get(Go.category)),status:$o(rs,n.get(Go.status)),season:$o(is,n.get(Go.season)),year:cs(n.get(Go.year),t),formats:es(ns,n.getAll(Go.format)),genres:us(n.getAll(Go.genre)),tags:us(n.getAll(Go.tag))}},us=e=>{let t=new Set,n=[];for(let r of e){let e=r.trim(),i=e.toLowerCase();!e||t.has(i)||(t.add(i),n.push(e))}return n},ds=e=>{let t=new URLSearchParams,n=e.query?.trim();n&&t.set(Go.query,n),e.category&&t.set(Go.category,e.category),e.status&&t.set(Go.status,e.status),e.season&&t.set(Go.season,e.season),e.year&&t.set(Go.year,String(e.year));for(let n of e.formats??[])t.append(Go.format,n);for(let n of e.genres??[])t.append(Go.genre,n);for(let n of e.tags??[])t.append(Go.tag,n);return t.toString()},fs=e=>{if(!e)return``;try{return decodeURIComponent(e)}catch{return e}},ps=(e={})=>{let t=ds(e);return t?`/search?${t}`:`/search`},ms=e=>{if(e.query)return`Results for \u201C${e.query}\u201D`;let t=Jo.find(t=>t.value===e.season)?.label;return t&&e.year?`${t} ${e.year}`:t?`${t} seasons`:e.year?String(e.year):vs(e)?`Browsing`:`Search`},hs=e=>Ko.find(t=>t.value===e)?.label,gs=e=>qo.find(t=>t.value===e)?.label,_s=(e,t)=>{let n=Jo.find(t=>t.value===e)?.label;return n&&t?`${n} ${t}`:t?String(t):void 0},vs=e=>!!(e.query||e.category||e.status||e.season||e.year||e.formats.length||e.genres.length||e.tags.length),ys=e=>!!(e.query||e.status||e.season||e.year||e.formats.length||e.genres.length||e.tags.length),bs=`plugins`,xs=`plugin`,Ss=(e,t)=>{try{return new URL(e,t)}catch{return}},Cs=e=>{let t=new Set;return e.filter(e=>{let n=ws(e);return!n||t.has(n)?!1:(t.add(n),!0)})},ws=e=>e.trim().replace(/\/+$/,``).replace(/@\d[^@/]*$/,``),Ts=(e,t)=>{let n=Ss(e,t);return n?Cs([...n.searchParams].filter(([e])=>e===`plugins`||e===xs).map(([,e])=>e.trim())):[]},Es=e=>encodeURIComponent(e).replace(/%3A/g,`:`).replace(/%2F/g,`/`).replace(/%40/g,`@`),Ds=(e,t,n)=>{let r=Ss(e,n),i=Ss(n);return!r||!i||r.origin!==i.origin?e:(r.searchParams.delete(bs),r.searchParams.delete(xs),r.search=[r.searchParams.toString(),Cs(t.map(e=>e.trim())).sort().map(e=>`${bs}=${Es(e)}`).join(`&`)].filter(Boolean).join(`&`),r.href)},Os=new Map,ks=new Set,As=new Set,js=()=>As.forEach(e=>{try{e()}catch{}}),Ms=e=>(As.add(e),()=>{As.delete(e)}),Ns=()=>[...Os.values()],Ps=()=>[...Os.keys()],Fs=e=>{let t=new Set(or().map(ws)),n=!1;for(let r of e){let e=ws(r);!e||t.has(e)||ks.has(e)||Os.has(r)||(Os.set(r,{uri:r,state:`offered`}),n=!0)}n&&js()},Is=()=>{if(Os.size){for(let e of Os.keys())ks.add(ws(e));Os.clear(),js()}},Ls=async()=>{let e=[...Os.keys()];if(e.length){for(let t of e)Os.set(t,{uri:t,state:`installing`});js();for(let t of e){try{await vr(t,{noConfirm:!0})||ks.add(ws(t)),Os.delete(t)}catch(e){Os.set(t,{uri:t,state:`error`,error:e instanceof Error?e.message:String(e)})}js()}}},Rs=e=>{Os.delete(e)&&(ks.add(ws(e)),js())},zs=()=>[...or(),...Ps()],Bs=()=>{let e=Ds(location.href,zs(),location.href);e!==location.href&&history.replaceState(history.state,``,e)},Vs=()=>Fs(Ts(location.href)),Hs=e=>{let t=Ds(e,zs(),location.href);return t.startsWith(location.origin)?t.slice(location.origin.length):t},Us=e=>{let t=history[e];history[e]=function(e,n,r){let i=r==null?location.href:String(r);return t.call(this,e,n,Ds(i,zs(),location.href))}},Ws=Symbol.for(`stub_plugin_url`);Ws in globalThis||(Object.defineProperty(globalThis,Ws,{value:!0}),Us(`pushState`),Us(`replaceState`),addEventListener(`popstate`,()=>{Vs(),Bs()}),ir(Bs),Ms(Bs),Vs(),Bs());var Gs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ks=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),qs=e=>{let t=Ks(e);return t.charAt(0).toUpperCase()+t.slice(1)},Js=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ys=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},Xs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};R();var Zs=he(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>ie(`svg`,{ref:c,...Xs,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Js(`lucide`,i),...!a&&!Ys(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>ie(e,t)),...Array.isArray(a)?a:[a]]));R();var Z=(e,t)=>{let n=he(({className:n,...r},i)=>ie(Zs,{ref:i,iconNode:t,className:Js(`lucide-${Gs(qs(e))}`,`lucide-${e}`,n),...r}));return n.displayName=qs(e),n},Qs=Z(`ban`,[[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$s=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ec=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),tc=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),nc=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),rc=Z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),ic=Z(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ac=Z(`frown`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M16 16s-1.5-2-4-2-4 2-4 2`,key:`epbg0q`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),oc=Z(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),sc=Z(`grid-3x2`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),cc=Z(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),lc=Z(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),uc=Z(`meh`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`8`,x2:`16`,y1:`15`,y2:`15`,key:`1xb1d9`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),dc=Z(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),fc=Z(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),pc=Z(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),mc=Z(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),hc=Z(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),gc=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),_c=Z(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),vc=Z(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),yc=Z(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),bc=Z(`user-x`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`17`,x2:`22`,y1:`8`,y2:`13`,key:`3nzzx3`}],[`line`,{x1:`22`,x2:`17`,y1:`8`,y2:`13`,key:`1swrse`}]]),xc=Z(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Sc=Z(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),Cc=Z(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),wc=Z(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),Tc=Z(`volume`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}]]),Ec=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Dc=e=>e===`/`||e===`/media`||e.startsWith(`/media/`),Oc=({from:e,to:t,kind:n,asked:r=!1})=>r?!0:n===`pop`||Dc(e.pathname)&&Dc(t.pathname)?!1:n===`replace`?e.pathname!==t.pathname:!0,kc=()=>{window.scrollTo({top:0,left:0,behavior:`instant`})},Ac=0,jc=()=>{Mc(),Ac=requestAnimationFrame(()=>{Ac=0,kc()})},Mc=()=>{cancelAnimationFrame(Ac),Ac=0},Nc=!1,Pc=()=>{Nc=!0},Fc=()=>{let e=Nc;return Nc=!1,e},Ic=[`input:not([inert])`,`select:not([inert])`,`textarea:not([inert])`,`a[href]:not([inert])`,`button:not([inert])`,`[tabindex]:not(slot):not([inert])`,`audio[controls]:not([inert])`,`video[controls]:not([inert])`,`[contenteditable]:not([contenteditable="false"]):not([inert])`,`details>summary:first-of-type:not([inert])`,`details:not([inert])`].join(`,`),Lc=typeof Element>`u`,Rc=Lc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zc=!Lc&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Bc=function e(t,n){n===void 0&&(n=!0);var r=t?.getAttribute?.call(t,`inert`);return r===``||r===`true`||n&&t&&e(t.parentNode)},Vc=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Hc=function(e,t,n){if(Bc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ic));return t&&Rc.call(e,Ic)&&r.unshift(e),r=r.filter(n),r},Uc=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Bc(o,!1))if(o.tagName===`SLOT`){var s=o.assignedElements(),c=e(s.length?s:o.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{Rc.call(o,Ic)&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot==`function`&&r.getShadowRoot(o),u=!Bc(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&u){var d=e(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}return i},Wc=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Gc=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Vc(e))&&!Wc(e)?0:e.tabIndex},Kc=function(e,t){var n=Gc(e);return n<0&&t&&!Wc(e)?0:n},qc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Jc=function(e){return e.tagName===`INPUT`},Yc=function(e){return Jc(e)&&e.type===`hidden`},Xc=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Zc=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Qc=function(e){if(!e.name)return!0;var t=e.form||zc(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Zc(r,e.form);return!i||i===e},$c=function(e){return Jc(e)&&e.type===`radio`},el=function(e){return $c(e)&&!Qc(e)},tl=function(e){var t=e&&zc(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=zc(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},nl=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},rl=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Rc.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Rc.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=zc(e);if(o&&!o.shadowRoot&&r(o)===!0)return nl(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(tl(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return nl(e);return!1},il=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Rc.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},al=function(e,t){return!(t.disabled||Bc(t)||Yc(t)||rl(t,e)||Xc(t)||il(t))},ol=function(e,t){return!(el(t)||Gc(t)<0||!al(e,t))},sl=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},cl=function e(t){var n=[],r=[];return t.forEach(function(t,i){var a=!!t.scopeParent,o=a?t.scopeParent:t,s=Kc(o,a),c=a?e(t.candidates):o;s===0?a?n.push.apply(n,c):n.push(o):r.push({documentOrder:i,tabIndex:s,item:t,isScope:a,content:c})}),r.sort(qc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},ll=function(e,t){return t||={},cl(t.getShadowRoot?Uc([e],t.includeContainer,{filter:ol.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sl}):Hc(e,t.includeContainer,ol.bind(null,t)))},ul=function(e,t){return t||={},t.getShadowRoot?Uc([e],t.includeContainer,{filter:al.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Hc(e,t.includeContainer,al.bind(null,t))},dl=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Rc.call(e,Ic)===!1?!1:ol(t,e)};R();function fl(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function pl(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ml(){return/apple/i.test(navigator.vendor)}function hl(){let e=/android/i;return e.test(fl())||e.test(pl())}function gl(){return pl().includes(`jsdom/`)}var _l=`data-floating-ui-focusable`,vl=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function yl(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function bl(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&i(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xl(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Sl(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Cl(e){return e.matches(`html,body`)}function wl(e){return e?.ownerDocument||document}function Tl(e){return N(e)&&e.matches(vl)}function El(e){return e?e.getAttribute(`role`)===`combobox`&&Tl(e):!1}function Dl(e){return e?e.hasAttribute(_l)?e:e.querySelector(`[data-floating-ui-focusable]`)||e:null}function Ol(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Ol(e,t.id,n)])}function kl(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Al(e){e.preventDefault(),e.stopPropagation()}function jl(e){return`nativeEvent`in e}function Ml(e){return e.mozInputSource===0&&e.isTrusted?!0:hl()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Nl(e){return gl()?!1:!hl()&&e.width===0&&e.height===0||hl()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Pl(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Q=typeof document<`u`?se:function(){},Fl={..._e};function Il(e){let t=z(e);return Q(()=>{t.current=e}),t}var Ll=Fl.useInsertionEffect||(e=>e());function Rl(e){let t=z(()=>{});return Ll(()=>{t.current=e}),L(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var zl=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Bl(e,t){let n=ll(e,zl()),r=n.length;if(r===0)return;let i=yl(wl(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Vl(e){return Bl(wl(e).body,1)||e}function Hl(e){return Bl(wl(e).body,-1)||e}function Ul(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!bl(n,r)}function Wl(e){ll(e,zl()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Gl(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}R();var Kl=typeof document<`u`?se:function(){};function ql(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ql(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ql(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Jl(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yl(e,t){let n=Jl(e);return Math.round(t*n)/n}function Xl(e){let t=z(e);return Kl(()=>{t.current=e}),t}function Zl(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V(r);ql(f,r)||p(r);let[m,h]=V(null),[g,_]=V(null),v=L(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=L(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z(null),C=z(null),w=z(u),T=c!=null,E=Xl(c),O=Xl(i),k=Xl(l),A=L(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),D(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ql(w.current,t)&&(w.current=t,ue(()=>{d(t)}))})},[f,t,n,O,k]);Kl(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=z(!1);Kl(()=>(j.current=!0,()=>{j.current=!1}),[]),Kl(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,A);A()}},[b,x,A,E,T]);let M=B(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=B(()=>({reference:b,floating:x}),[b,x]),P=B(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Yl(N.floating,u.x),r=Yl(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Jl(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return B(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Ql=(e,t)=>({...y(e),options:[e,t]}),$l=(e,t)=>({...v(e),options:[e,t]}),eu=(e,t)=>({...w(e),options:[e,t]}),tu=(e,t)=>({...f(e),options:[e,t]});R(),le();var nu=`data-floating-ui-focusable`,ru=`active`,iu=`selected`,au=`ArrowLeft`,ou=`ArrowRight`,su=`ArrowUp`,cu=`ArrowDown`,lu=[au,ou],uu=[su,cu];[...lu,...uu];var du={..._e},fu=!1,pu=0,mu=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+pu++;function hu(){let[e,t]=V(()=>fu?mu():void 0);return Q(()=>{e??t(mu())},[]),H(()=>{fu=!0},[]),e}var gu=du.useId||hu;function _u(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var vu=ne(null),yu=ne(null),bu=()=>F(vu)?.id||null,xu=()=>F(yu);function Su(e){return`data-floating-ui-`+e}function Cu(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var wu=Su(`safe-polygon`);function Tu(e,t,n){if(n&&!Pl(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Eu(e){return typeof e==`function`?e():e}function Du(e,t){t===void 0&&(t={});let{open:n,onOpenChange:i,dataRef:a,events:o,elements:s}=e,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,m=xu(),h=bu(),g=Il(u),_=Il(l),v=Il(n),y=Il(f),b=z(),x=z(-1),S=z(),C=z(-1),w=z(!0),T=z(!1),E=z(()=>{}),D=z(!1),O=Rl(()=>{let e=a.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});H(()=>{if(!c)return;function e(e){let{open:t}=e;t||(Cu(x),Cu(C),w.current=!0,D.current=!1)}return o.on(`openchange`,e),()=>{o.off(`openchange`,e)}},[c,o]),H(()=>{if(!c||!g.current||!n)return;function e(e){O()&&i(!1,e,`hover`)}let t=wl(s.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[s.floating,n,i,c,g,O]);let k=L(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let r=Tu(_.current,`close`,b.current);r&&!S.current?(Cu(x),x.current=window.setTimeout(()=>i(!1,e,n),r)):t&&(Cu(x),i(!1,e,n))},[_,i]),A=Rl(()=>{E.current(),S.current=void 0}),j=Rl(()=>{if(T.current){let e=wl(s.floating).body;e.style.pointerEvents=``,e.removeAttribute(wu),T.current=!1}}),M=Rl(()=>a.current.openEvent?[`click`,`mousedown`].includes(a.current.openEvent.type):!1);H(()=>{if(!c)return;function e(e){if(Cu(x),w.current=!1,d&&!Pl(b.current)||Eu(y.current)>0&&!Tu(_.current,`open`))return;let t=Tu(_.current,`open`,b.current);t?x.current=window.setTimeout(()=>{v.current||i(!0,e,`hover`)},t):n||i(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=wl(s.floating);if(Cu(C),D.current=!1,g.current&&a.current.floatingContext){n||Cu(x),S.current=g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=S.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)};return}(b.current!==`touch`||!bl(s.floating,e.relatedTarget))&&k(e)}function o(e){M()||a.current.floatingContext&&(g.current==null||g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function l(){Cu(x)}function u(e){M()||k(e,!1)}if(r(s.domReference)){let r=s.domReference,i=s.floating;return n&&r.addEventListener(`mouseleave`,o),p&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,o),i.addEventListener(`mouseenter`,l),i.addEventListener(`mouseleave`,u)),()=>{n&&r.removeEventListener(`mouseleave`,o),p&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,o),i.removeEventListener(`mouseenter`,l),i.removeEventListener(`mouseleave`,u))}}},[s,c,e,d,p,k,A,j,i,n,v,m,_,g,a,M,y]),Q(()=>{var e;if(c&&n&&(e=g.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=s.floating;if(r(s.domReference)&&e){var t;let n=wl(s.floating).body;n.setAttribute(wu,``);let r=s.domReference,i=m==null||(t=m.nodesRef.current.find(e=>e.id===h))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[c,n,h,s,m,g,O]),Q(()=>{n||(b.current=void 0,D.current=!1,A(),j())},[n,A,j]),H(()=>()=>{A(),Cu(x),Cu(C),j()},[c,s.domReference,A,j]);let N=B(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function r(){!w.current&&!v.current&&i(!0,t,`hover`)}d&&!Pl(b.current)||n||Eu(y.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(Cu(C),b.current===`touch`?r():(D.current=!0,C.current=window.setTimeout(r,Eu(y.current))))}}},[d,i,n,v,y]);return B(()=>c?{reference:N}:{},[c,N])}var Ou=0;function ku(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Ou);let a=()=>e?.focus({preventScroll:n});i?a():Ou=requestAnimationFrame(a)}function Au(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&i(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ju(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Mu(e){return e?.ownerDocument||document}var Nu={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Pu(e){return e===`inert`?Nu.inert:e===`aria-hidden`?Nu[`aria-hidden`]:Nu.none}var Fu=new WeakSet,Iu={},Lu=0,Ru=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype,zu=e=>e&&(e.host||zu(e.parentNode)),Bu=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=zu(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Vu(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=Bu(t,e),s=new Set,c=new Set(o),l=[];Iu[i]||(Iu[i]=new WeakMap);let u=Iu[i];o.forEach(d),f(t),s.clear();function d(e){!e||s.has(e)||(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(m(e)!==`script`)if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=Pu(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&Fu.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return Lu++,()=>{l.forEach(e=>{let t=Pu(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!Fu.has(e)&&a&&e.removeAttribute(a),Fu.delete(e)),r||e.removeAttribute(i)}),Lu--,Lu||(Nu.inert=new WeakMap,Nu[`aria-hidden`]=new WeakMap,Nu.none=new WeakMap,Fu=new WeakSet,Iu={})}}function Hu(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=Mu(e[0]).body;return Vu(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var Uu={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Wu=he(function(e,t){let[n,r]=V();Q(()=>{ml()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Su(`focus-guard`)]:``,style:Uu};return M(`span`,{...e,...i})}),Gu=ne(null),Ku=Su(`portal`);function qu(e){e===void 0&&(e={});let{id:t,root:n}=e,r=gu(),i=Yu(),[o,s]=V(null),c=z(null);return Q(()=>()=>{o?.remove(),queueMicrotask(()=>{c.current=null})},[o]),Q(()=>{if(!r||c.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Ku,``),e.appendChild(n),c.current=n,s(n)},[t,r]),Q(()=>{if(n===null||!r||c.current)return;let e=n||i?.portalNode;e&&!a(e)&&(e=e.current),e||=document.body;let o=null;t&&(o=document.createElement(`div`),o.id=t,e.appendChild(o));let l=document.createElement(`div`);l.id=r,l.setAttribute(Ku,``),e=o||e,e.appendChild(l),c.current=l,s(l)},[t,n,r,i]),o}function Ju(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=qu({id:n,root:r}),[o,s]=V(null),c=z(null),l=z(null),u=z(null),d=z(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return H(()=>{if(!a||!i||f)return;function e(e){a&&Ul(e)&&(e.type===`focusin`?Gl:Wl)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),H(()=>{a&&(p||Gl(a))},[p,a]),M(Gu.Provider,{value:B(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&M(Wu,{"data-type":`outside`,ref:c,onFocus:e=>{if(Ul(e,a)){var t;(t=u.current)==null||t.focus()}else Hl(o?o.domReference:null)?.focus()}}),m&&a&&M(`span`,{"aria-owns":a.id,style:Uu}),a&&pe(t,a),m&&a&&M(Wu,{"data-type":`outside`,ref:l,onFocus:e=>{if(Ul(e,a)){var t;(t=d.current)==null||t.focus()}else Vl(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Yu=()=>F(Gu);function Xu(e){return B(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var Zu=20,Qu=[];function $u(){Qu=Qu.filter(e=>e.isConnected)}function ed(e){$u(),e&&m(e)!==`body`&&(Qu.push(e),Qu.length>Zu&&(Qu=Qu.slice(-20)))}function td(){return $u(),Qu[Qu.length-1]}function nd(e){let t=zl();return dl(e,t)?e:ll(e,t)[0]||e}function rd(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=zl(),i=ul(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return dl(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}var id=he(function(e,t){return M(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:Uu})});function ad(e){let{context:t,children:n,disabled:r=!1,order:i=[`content`],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:h,events:g,dataRef:_,elements:{domReference:v,floating:y}}=t,b=Rl(()=>_.current.floatingContext?.nodeId),x=Rl(p),S=typeof o==`number`&&o<0,C=El(v)&&S,w=Ru(),T=w?a:!0,E=!T||w&&f,D=Il(i),O=Il(o),k=Il(s),A=xu(),j=Yu(),P=z(null),ee=z(null),F=z(!1),ne=z(!1),re=z(-1),ie=z(-1),I=j!=null,L=Dl(y),ae=Rl(function(e){return e===void 0&&(e=L),e?ll(e,zl()):[]}),oe=Rl(e=>{let t=ae(e);return D.current.map(e=>v&&e===`reference`?v:L&&e===`floating`?L:t).filter(Boolean).flat()});H(()=>{if(r||!l)return;function e(e){if(e.key===`Tab`){bl(L,yl(wl(L)))&&ae().length===0&&!C&&Al(e);let t=oe(),n=xl(e);D.current[0]===`reference`&&n===v&&(Al(e),e.shiftKey?ku(t[t.length-1]):ku(t[1])),D.current[1]===`floating`&&n===L&&e.shiftKey&&(Al(e),ku(t[0]))}}let t=wl(L);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,v,L,l,D,C,ae,oe]),H(()=>{if(r||!y)return;function e(e){let t=xl(e),n=ae().indexOf(t);n!==-1&&(re.current=n)}return y.addEventListener(`focusin`,e),()=>{y.removeEventListener(`focusin`,e)}},[r,y,ae]),H(()=>{if(r||!d)return;function e(){ne.current=!0,setTimeout(()=>{ne.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=xl(e);queueMicrotask(()=>{let i=b(),a=!(bl(v,t)||bl(y,t)||bl(t,y)||bl(j?.portalNode,t)||t!=null&&t.hasAttribute(Su(`focus-guard`))||A&&(Ol(A.nodesRef.current,i).find(e=>bl(e.context?.elements.floating,t)||bl(e.context?.elements.domReference,t))||kl(A.nodesRef.current,i).find(e=>[e.context?.elements.floating,Dl(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===v&&L&&rd(L,D),c&&n!==v&&!(r!=null&&r.isConnected)&&yl(wl(L))===wl(L).body){N(L)&&L.focus();let e=re.current,t=ae(),n=t[e]||t[t.length-1]||L;N(n)&&n.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(C||!l)&&t&&a&&!ne.current&&t!==td()&&(F.current=!0,h(!1,e,`focus-out`))})}let n=!!(!A&&j);function i(){Cu(ie),_.current.insideReactTree=!0,ie.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&N(v))return v.addEventListener(`focusout`,t),v.addEventListener(`pointerdown`,e),y.addEventListener(`focusout`,t),n&&y.addEventListener(`focusout`,i,!0),()=>{v.removeEventListener(`focusout`,t),v.removeEventListener(`pointerdown`,e),y.removeEventListener(`focusout`,t),n&&y.removeEventListener(`focusout`,i,!0)}},[r,v,y,L,l,A,j,h,d,c,ae,C,b,D,_]);let R=z(null),se=z(null),ce=Xu([R,j?.beforeInsideRef]),le=Xu([se,j?.afterInsideRef]);H(()=>{var e,t;if(r||!y)return;let n=Array.from((j==null||(e=j.portalNode)==null?void 0:e.querySelectorAll(`[`+Su(`portal`)+`]`))||[]),i=(t=(A?kl(A.nodesRef.current,b()):[]).find(e=>El(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,a=[y,i,...n,...x(),P.current,ee.current,R.current,se.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,D.current.includes(`reference`)||C?v:null].filter(e=>e!=null),o=l||C?Hu(a,!E,E):Hu(a);return()=>{o()}},[r,v,y,l,D,j,C,T,E,A,b,x]),Q(()=>{if(r||!N(L))return;let e=yl(wl(L));queueMicrotask(()=>{let t=oe(L),n=O.current,r=(typeof n==`number`?t[n]:n.current)||L,i=bl(L,e);!S&&!i&&m&&ku(r,{preventScroll:r===L})})},[r,m,L,S,oe,O]),Q(()=>{if(r||!L)return;let e=wl(L);ed(yl(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(F.current=!0),t===`outside-press`)if(r)F.current=!1;else if(Ml(n)||Nl(n))F.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}g.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,Uu),I&&v&&v.insertAdjacentElement(`afterend`,n);function i(){if(typeof k.current==`boolean`){let e=v||td();return e&&e.isConnected?e:n}return k.current.current||n}return()=>{g.off(`openchange`,t);let r=yl(e),a=bl(y,r)||A&&Ol(A.nodesRef.current,b(),!1).some(e=>bl(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=nd(o);k.current&&!F.current&&N(t)&&(!(t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),n.remove()})}},[r,y,L,k,_,g,A,I,v,b]),H(()=>(queueMicrotask(()=>{F.current=!1}),()=>{queueMicrotask($u)}),[r]),Q(()=>{if(!r&&j)return j.setFocusManagerState({modal:l,closeOnFocusOut:d,open:m,onOpenChange:h,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,l,m,h,d,v]),Q(()=>{r||L&&rd(L,D)},[r,L,D]);function ue(e){return r||!u||!l?null:M(id,{ref:e===`start`?P:ee,onClick:e=>h(!1,e.nativeEvent),children:typeof u==`string`?u:`Dismiss`})}let de=!r&&T&&(l?!C:!0)&&(I||l);return M(te,{children:[de&&M(Wu,{"data-type":`inside`,ref:ce,onFocus:e=>{if(l){let e=oe();ku(i[0]===`reference`?e[0]:e[e.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(F.current=!1,Ul(e,j.portalNode))Vl(v)?.focus();else{var t;(t=j.beforeOutsideRef.current)==null||t.focus()}}}),!C&&ue(`start`),n,ue(`end`),de&&M(Wu,{"data-type":`inside`,ref:le,onFocus:e=>{if(l)ku(oe()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(d&&(F.current=!0),Ul(e,j.portalNode))Hl(v)?.focus();else{var t;(t=j.afterOutsideRef.current)==null||t.focus()}}})]})}var od=0,sd=`--floating-ui-scrollbar-width`;function cd(){let e=fl(),t=/iP(hone|ad|od)|iOS/.test(e)||e===`MacIntel`&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?`paddingLeft`:`paddingRight`,i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,o=n.top?parseFloat(n.top):window.scrollY;if(n.overflow=`hidden`,n.setProperty(sd,i+`px`),i&&(n[r]=i+`px`),t){let e=window.visualViewport?.offsetLeft||0,t=window.visualViewport?.offsetTop||0;Object.assign(n,{position:`fixed`,top:-(o-Math.floor(t))+`px`,left:-(a-Math.floor(e))+`px`,right:`0`})}return()=>{Object.assign(n,{overflow:``,[r]:``}),n.removeProperty(sd),t&&(Object.assign(n,{position:``,top:``,left:``,right:``}),window.scrollTo(a,o))}}var ld=()=>{},ud=he(function(e,t){let{lockScroll:n=!1,...r}=e;return Q(()=>{if(n)return od++,od===1&&(ld=cd()),()=>{od--,od===0&&ld()}},[n]),M(`div`,{ref:t,...r,style:{position:`fixed`,overflow:`auto`,top:0,right:0,bottom:0,left:0,...r.style}})});function dd(e){return N(e.target)&&e.target.tagName===`BUTTON`}function fd(e){return N(e.target)&&e.target.tagName===`A`}function pd(e){return Tl(e)}function md(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=z(),p=z(!1),m=B(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;e.button===0&&s!==`click`&&(Pl(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent,`click`):(e.preventDefault(),r(!0,e.nativeEvent,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}Pl(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent,`click`):r(!0,e.nativeEvent,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||dd(e))&&(e.key===` `&&!pd(a)&&(e.preventDefault(),p.current=!0),!fd(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!u||dd(e)||pd(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent,`click`))}}),[i,a,s,l,u,r,n,d,c]);return B(()=>o?{reference:m}:{},[o,m])}var hd={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},gd={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},_d=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function vd(e,t){t===void 0&&(t={});let{open:n,onOpenChange:i,elements:a,dataRef:o}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:p=`pointerdown`,referencePress:m=!1,referencePressEvent:h=`pointerdown`,ancestorScroll:g=!1,bubbles:_,capture:v}=t,y=xu(),b=Rl(typeof f==`function`?f:()=>!1),x=typeof f==`function`?b:f,S=z(!1),{escapeKey:C,outsidePress:w}=_d(_),{escapeKey:T,outsidePress:E}=_d(v),D=z(!1),O=Rl(e=>{if(!n||!s||!l||e.key!==`Escape`||D.current)return;let t=o.current.floatingContext?.nodeId,r=y?Ol(y.nodesRef.current,t):[];if(!C&&(e.stopPropagation(),r.length>0)){let e=!0;if(r.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}i(!1,jl(e)?e.nativeEvent:e,`escape-key`)}),k=Rl(e=>{var t;let n=()=>{var t;O(e),(t=xl(e))==null||t.removeEventListener(`keydown`,n)};(t=xl(e))==null||t.addEventListener(`keydown`,n)}),A=Rl(e=>{let t=o.current.insideReactTree;o.current.insideReactTree=!1;let n=S.current;if(S.current=!1,p===`click`&&n||t||typeof x==`function`&&!x(e))return;let s=xl(e),c=`[`+Su(`inert`)+`]`,l=wl(a.floating).querySelectorAll(c),f=r(s)?s:null;for(;f&&!d(f);){let e=u(f);if(d(e)||!r(e))break;f=e}if(l.length&&r(s)&&!Cl(s)&&!bl(s,a.floating)&&Array.from(l).every(e=>!bl(f,e)))return;if(N(s)&&te){let t=d(s),n=ee(s),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),o=i&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,c=a&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),f=o&&e.offsetY>s.clientHeight;if(u||f)return}let m=o.current.floatingContext?.nodeId,h=y&&Ol(y.nodesRef.current,m).some(t=>Sl(e,t.context?.elements.floating));if(Sl(e,a.floating)||Sl(e,a.domReference)||h)return;let g=y?Ol(y.nodesRef.current,m):[];if(g.length>0){let e=!0;if(g.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}i(!1,e,`outside-press`)}),j=Rl(e=>{var t;let n=()=>{var t;A(e),(t=xl(e))==null||t.removeEventListener(p,n)};(t=xl(e))==null||t.addEventListener(p,n)});H(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=C,o.current.__outsidePressBubbles=w;let e=-1;function t(e){i(!1,e,`ancestor-scroll`)}function u(){window.clearTimeout(e),D.current=!0}function d(){e=window.setTimeout(()=>{D.current=!1},c()?5:0)}let f=wl(a.floating);l&&(f.addEventListener(`keydown`,T?k:O,T),f.addEventListener(`compositionstart`,u),f.addEventListener(`compositionend`,d)),x&&f.addEventListener(p,E?j:A,E);let m=[];return g&&(r(a.domReference)&&(m=P(a.domReference)),r(a.floating)&&(m=m.concat(P(a.floating))),!r(a.reference)&&a.reference&&a.reference.contextElement&&(m=m.concat(P(a.reference.contextElement)))),m=m.filter(e=>e!==f.defaultView?.visualViewport),m.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{l&&(f.removeEventListener(`keydown`,T?k:O,T),f.removeEventListener(`compositionstart`,u),f.removeEventListener(`compositionend`,d)),x&&f.removeEventListener(p,E?j:A,E),m.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[o,a,l,x,p,n,i,g,s,C,w,O,T,k,A,E,j]),H(()=>{o.current.insideReactTree=!1},[o,x,p]);let M=B(()=>({onKeyDown:O,...m&&{[hd[h]]:e=>{i(!1,e.nativeEvent,`reference-press`)},...h!==`click`&&{onClick(e){i(!1,e.nativeEvent,`reference-press`)}}}}),[O,i,m,h]),te=B(()=>({onKeyDown:O,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[gd[p]]:()=>{o.current.insideReactTree=!0}}),[O,p,o]);return B(()=>s?{reference:M,floating:te}:{},[s,M,te])}function yd(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=gu(),a=z({}),[o]=V(()=>_u()),s=bu()!=null,[c,l]=V(r.reference),u=Rl((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=B(()=>({setPositionReference:l}),[]),f=B(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return B(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function bd(e){e===void 0&&(e={});let{nodeId:t}=e,n=yd({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,a=i.elements,[o,s]=V(null),[c,l]=V(null),u=a?.domReference||o,d=z(null),f=xu();Q(()=>{u&&(d.current=u)},[u]);let p=Zl({...e,elements:{...a,...c&&{reference:c}}}),m=L(e=>{let t=r(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),p.refs.setReference(t)},[p.refs]),h=L(e=>{(r(e)||e===null)&&(d.current=e,s(e)),(r(p.refs.reference.current)||p.refs.reference.current===null||e!==null&&!r(e))&&p.refs.setReference(e)},[p.refs]),g=B(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),_=B(()=>({...p.elements,domReference:u}),[p.elements,u]),v=B(()=>({...p,...i,refs:g,elements:_,nodeId:t}),[p,g,_,t,i]);return Q(()=>{i.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),B(()=>({...p,context:v,refs:g,elements:_}),[p,g,_,v])}function xd(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[ru]:t,[iu]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[nu]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[ru,iu].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Sd(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=L(t=>xd(t,e,`reference`),t),a=L(t=>xd(t,e,`floating`),n),o=L(t=>xd(t,e,`item`),r);return B(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Cd=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function wd(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=gu(),c=r.domReference?.id||s,l=B(()=>Dl(r.floating)?.id||i,[r.floating,i]),u=Cd.get(o)??o,d=bu()!=null,f=B(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=B(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=L(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return B(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Td=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function Ed(e,t){return typeof e==`function`?e(t):e}function Dd(e,t){let[n,r]=V(e);return e&&!n&&r(!0),H(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function Od(e,t){t===void 0&&(t={});let{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i==`number`?i:i.close)||0,[o,s]=V(`unmounted`),c=Dd(n,a);return!c&&o===`close`&&s(`unmounted`),Q(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{ue(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function kd(e,t){t===void 0&&(t={});let{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,c=s.split(`-`)[0],l=B(()=>({side:c,placement:s}),[c,s]),u=typeof o==`number`,d=(u?o:o.open)||0,f=(u?o:o.close)||0,[p,m]=V(()=>({...Ed(a,l),...Ed(n,l)})),{isMounted:h,status:g}=Od(e,{duration:o}),_=Il(n),v=Il(r),y=Il(i),b=Il(a);return Q(()=>{let e=Ed(_.current,l),t=Ed(y.current,l),n=Ed(b.current,l),r=Ed(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(g===`initial`&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),g===`open`&&m({transitionProperty:Object.keys(r).map(Td).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(Td).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}function Ad(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Ad(e,t.id,n)])}function jd(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Md(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Nd(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:i=!0}=e,a={current:-1},o=!1,s=null,c=null,l=typeof performance<`u`?performance.now():0;function u(e,t){let n=performance.now(),r=n-l;if(s===null||c===null||r===0)return s=e,c=t,l=n,null;let i=e-s,a=t-c,o=Math.sqrt(i*i+a*a)/r;return s=e,c=t,l=n,o}let d=e=>{let{x:n,y:s,placement:c,elements:l,onClose:d,nodeId:f,tree:p}=e;return function(e){function m(){Cu(a),d()}if(Cu(a),!l.domReference||!l.floating||c==null||n==null||s==null)return;let{clientX:h,clientY:g}=e,_=[h,g],v=ju(e),y=e.type===`mouseleave`,b=Au(l.floating,v),x=Au(l.domReference,v),S=l.domReference.getBoundingClientRect(),C=l.floating.getBoundingClientRect(),w=c.split(`-`)[0],T=n>C.right-C.width/2,E=s>C.bottom-C.height/2,D=Md(_,S),O=C.width>S.width,k=C.height>S.height,A=(O?S:C).left,j=(O?S:C).right,M=(k?S:C).top,N=(k?S:C).bottom;if(b&&(o=!0,!y))return;if(x&&(o=!1),x&&!y){o=!0;return}if(y&&r(e.relatedTarget)&&Au(l.floating,e.relatedTarget)||p&&Ad(p.nodesRef.current,f).length)return;if(w===`top`&&s>=S.bottom-1||w===`bottom`&&s<=S.top+1||w===`left`&&n>=S.right-1||w===`right`&&n<=S.left+1)return m();let P=[];switch(w){case`top`:P=[[A,S.top+1],[A,C.bottom-1],[j,C.bottom-1],[j,S.top+1]];break;case`bottom`:P=[[A,C.top+1],[A,S.bottom-1],[j,S.bottom-1],[j,C.top+1]];break;case`left`:P=[[C.right-1,N],[C.right-1,M],[S.left+1,M],[S.left+1,N]];break;case`right`:P=[[S.right-1,N],[S.right-1,M],[C.left+1,M],[C.left+1,N]];break}function ee(e){let[n,r]=e;switch(w){case`top`:return[[O?n+t/2:T?n+t*4:n-t*4,r+t+1],[O?n-t/2:T?n+t*4:n-t*4,r+t+1],[C.left,T||O?C.bottom-t:C.top],[C.right,T?O?C.bottom-t:C.top:C.bottom-t]];case`bottom`:return[[O?n+t/2:T?n+t*4:n-t*4,r-t],[O?n-t/2:T?n+t*4:n-t*4,r-t],[C.left,T||O?C.top+t:C.bottom],[C.right,T?O?C.top+t:C.bottom:C.top+t]];case`left`:{let e=[n+t+1,k?r+t/2:E?r+t*4:r-t*4],i=[n+t+1,k?r-t/2:E?r+t*4:r-t*4];return[[E||k?C.right-t:C.left,C.top],[E?k?C.right-t:C.left:C.right-t,C.bottom],e,i]}case`right`:return[[n-t,k?r+t/2:E?r+t*4:r-t*4],[n-t,k?r-t/2:E?r+t*4:r-t*4],[E||k?C.left+t:C.right,C.top],[E?k?C.left+t:C.right:C.left+t,C.bottom]]}}if(!jd([h,g],P)){if(o&&!D)return m();if(!y&&i){let t=u(e.clientX,e.clientY);if(t!==null&&t<.1)return m()}jd([h,g],ee([n,s]))?!o&&i&&(a.current=window.setTimeout(m,40)):m()}}};return d.__options={blockPointerEvents:n},d}R();var Pd=({className:e,style:t}={})=>ie(`iframe`,{src:S(),title:`Connect your FKN account`,className:e,style:{border:`none`,width:150,height:40,background:`transparent`,colorScheme:`normal`,...t}}),Fd=8e3,Id=async(e,t=Fd)=>{let n,r=new Promise(e=>{n=setTimeout(()=>e(`timeout`),t)});try{return await Promise.race([Promise.resolve().then(e).then(()=>`settled`,()=>`settled`),r])}finally{clearTimeout(n)}},Ld=()=>Promise.race([be.info(),new Promise(e=>setTimeout(()=>e(null),4e3))]),Rd=()=>{let[e,t]=V(null),[n,r]=V(!1),i=L(()=>Ld().then(e=>{t(e),r(!0)}).catch(()=>r(!0)),[]);return H(()=>{let e=!1,t=be.onChange(()=>{e||i()});i();let n=window.setInterval(()=>{e||i()},3e4);return()=>{e=!0,window.clearInterval(n),t.then(e=>e()).catch(()=>{})}},[i]),{info:e,ready:n,logout:L(async()=>{let e=await Id(()=>be.logout());return await i(),e},[i])}},zd={categoryBar:1,hoverCard:150,sourcePopup:300,filterMenu:500,mediaModal:1e3,header:1100,headerPopup:1150,franchiseDialog:1200,pluginPrompt:2e3,partyCursor:3e3};I();var Bd=`https://fkn.app/account`,Vd=150,Hd=40,Ud=l`
23
- display: flex;
24
- align-items: center;
25
- gap: 0.8rem;
26
- padding: 0.4rem 0.6rem 0.4rem 1.2rem;
27
- height: 4rem;
28
- border: 1px solid rgba(255, 255, 255, 0.15);
29
- border-radius: 2rem;
30
- background: transparent;
31
- color: rgba(255, 255, 255, 0.6);
32
- font-family: inherit;
33
- cursor: pointer;
34
- transition: all 0.15s;
35
-
36
- &:hover, &[aria-expanded='true'] {
37
- color: rgba(255, 255, 255, 0.9);
38
- border-color: rgba(255, 255, 255, 0.35);
39
- }
40
-
41
- .who {
42
- display: flex;
43
- flex-direction: column;
44
- align-items: flex-end;
45
- gap: 0.1rem;
46
- line-height: 1.15;
47
- min-width: 0;
48
- }
49
-
50
- .name {
51
- max-width: 18rem;
52
- overflow: hidden;
53
- text-overflow: ellipsis;
54
- white-space: nowrap;
55
- font-size: 1.4rem;
56
- font-weight: 600;
57
- color: rgba(255, 255, 255, 0.85);
58
- }
59
-
60
- .tier {
61
- font-size: 1rem;
62
- font-weight: 700;
63
- text-transform: uppercase;
64
- letter-spacing: 0.06em;
65
- }
66
-
67
- .tier.premium { color: #7dd3a0; }
68
- .tier.free { color: rgba(255, 255, 255, 0.45); }
69
-
70
- .chevron { flex-shrink: 0; }
71
- `,Wd=l`
72
- z-index: ${zd.headerPopup};
73
- display: flex;
74
- flex-direction: column;
75
- min-width: 18rem;
76
- padding: 0.6rem;
77
- border: 1px solid rgba(255, 255, 255, 0.12);
78
- border-radius: 0.8rem;
79
- background: rgba(25, 25, 25, 0.97);
80
- backdrop-filter: blur(8px);
81
- box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.5);
82
-
83
- .item {
84
- display: flex;
85
- align-items: center;
86
- gap: 0.9rem;
87
- padding: 0.9rem 1.1rem;
88
- border: none;
89
- border-radius: 0.5rem;
90
- background: transparent;
91
- color: rgba(255, 255, 255, 0.7);
92
- font-family: inherit;
93
- font-size: 1.4rem;
94
- text-align: left;
95
- white-space: nowrap;
96
- cursor: pointer;
97
- transition: background 0.15s, color 0.15s;
98
-
99
- &:hover:not(:disabled) {
100
- background: rgba(255, 255, 255, 0.08);
101
- color: #fff;
102
- }
103
-
104
- &:disabled {
105
- opacity: 0.6;
106
- cursor: default;
107
- }
108
-
109
- svg { flex-shrink: 0; }
110
- }
111
- `,Gd=l`
112
- width: ${Vd}px;
113
- height: ${Hd}px;
114
- `,Kd=()=>{let{info:e,ready:t,logout:n}=Rd(),[r,i]=V(!1),[a,o]=V(!1),{refs:s,floatingStyles:c,context:l}=bd({open:r,onOpenChange:i,placement:`bottom-end`,middleware:[Ql(8),eu(),$l({padding:8})],whileElementsMounted:_}),{getReferenceProps:u,getFloatingProps:d}=Sd([md(l),vd(l),wd(l,{role:`menu`})]);H(()=>{e||(i(!1),o(!1))},[e]);let f=async()=>{o(!0);try{await n()}finally{o(!1),i(!1)}};return t?e?g(C,{children:[g(`button`,{ref:s.setReference,css:Ud,type:`button`,"aria-label":`FKN account: ${e.name||`Account`}`,...u(),children:[g(`span`,{className:`who`,children:[j(`span`,{className:`name`,children:e.name||`Account`}),j(`span`,{className:`tier ${e.premium?`premium`:`free`}`,children:e.premium?`Premium`:`Free`})]}),j(ec,{size:16,className:`chevron`})]}),r?j(Ju,{children:j(ad,{context:l,modal:!1,children:g(`div`,{ref:s.setFloating,style:c,css:Wd,...d(),children:[g(`a`,{className:`item`,href:Bd,target:`_blank`,rel:`noreferrer`,children:[j(ic,{size:16}),`Manage account`]}),g(`button`,{className:`item`,type:`button`,disabled:a,onClick:f,children:[j(lc,{size:16}),a?`Disconnecting...`:`Disconnect`]})]})})}):void 0]}):j(Pd,{style:{flex:`none`,width:Vd,height:Hd}}):j(`div`,{css:Gd})},qd=new Set([`nav`,`scroll`,`cursor`,`playback`,`state`,`pong`]),Jd=e=>qd.has(e.t),Yd=e=>e.trim().slice(0,500)||void 0,Xd=e=>e.trim().replace(/\s+/g,` `).slice(0,32)||void 0,Zd=e=>JSON.stringify({v:1,...e}),Qd=e=>{let t;try{t=JSON.parse(e)}catch{return}if(!t||typeof t!=`object`)return;let n=t;if(n.v===1)switch(n.t){case`nav`:return $d(n.path)?{t:`nav`,path:n.path}:void 0;case`scroll`:return tf(n.y)?{t:`scroll`,y:n.y}:void 0;case`cursor`:return tf(n.x)&&tf(n.y)?{t:`cursor`,x:n.x,y:n.y}:void 0;case`chat`:{let e=typeof n.text==`string`?Yd(n.text):void 0;return e?{t:`chat`,text:e}:void 0}case`name`:{let e=typeof n.name==`string`?Xd(n.name):void 0;return e?{t:`name`,name:e}:void 0}case`ping`:return ef(n.n)&&ef(n.at)?{t:`ping`,n:n.n,at:n.at}:void 0;case`pong`:return ef(n.n)&&ef(n.at)&&ef(n.host)?{t:`pong`,n:n.n,at:n.at,host:n.host}:void 0;case`playback`:return nf(n.s)?{t:`playback`,s:n.s}:void 0;case`state`:return!$d(n.path)||!tf(n.y)||n.s!==void 0&&!nf(n.s)?void 0:{t:`state`,path:n.path,y:n.y,...n.s?{s:n.s}:{}};default:return}},$d=e=>typeof e==`string`&&e.length>0&&e.length<=2048&&e.startsWith(`/`)&&!e.startsWith(`//`)&&!e.startsWith(`/\\`)&&!/[\r\n\t]/.test(e),ef=e=>typeof e==`number`&&Number.isFinite(e),tf=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1,nf=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.paused==`boolean`&&typeof t.time==`number`&&Number.isFinite(t.time)&&t.time>=0&&typeof t.rate==`number`&&Number.isFinite(t.rate)&&t.rate>0&&t.rate<=16&&typeof t.at==`number`&&Number.isFinite(t.at)},rf=1.05,af=5e3,of=(e,t,n=!1)=>{if(e.paused)return e.time;let r=Math.max(t-e.at,0),i=(n?r:Math.min(r,sf))/1e3;return e.time+i*e.rate},sf=2e3,cf=(e,t,n,r=!1)=>{let i={},a=of(t,n,r),o=a-e.time;Math.abs(o)>.5&&(i.seek=a),t.paused&&!e.paused&&(i.pause=!0),!t.paused&&e.paused&&(i.play=!0);let s=!t.paused&&i.seek===void 0&&Math.abs(o)>=.05?t.rate*(o>0?rf:1/rf):t.rate;return Math.abs(e.rate-s)>.001&&(i.rate=s),i},lf=(e,t,n)=>({...e,time:e.paused?e.time:e.time+Math.max(0,n-t)/1e3*e.rate,at:n}),uf=(e,t,n)=>({rtt:n-e,offset:t-(e+n)/2}),df=e=>e.length?e.reduce((e,t)=>t.rtt<e.rtt?t:e):void 0,ff=(e,t)=>e-t,pf=4e3,mf=`stub-party-invite`,hf=`stub-party-name`,gf=1e4,_f=3e4,vf=6e4,yf=()=>{try{return globalThis.sessionStorage}catch{return}},bf=e=>e instanceof Error&&typeof e.code==`string`,xf=(e,t=yf())=>{let n={status:`idle`},r,i,a={path:`/`,y:0},o=new Set,s=new Set,c,l,u=new Map,d=new Map,f=[],p,m,h,g=new Map,_=1,v=(()=>{try{return t?.getItem(`stub-party-name`)??void 0}catch{return}})(),y=e=>{n=e;for(let e of o)e(n)},b=e=>{try{t?.setItem(mf,e)}catch{}},x=()=>{try{t?.removeItem(mf)}catch{}},S=()=>{try{return t?.getItem(`stub-party-invite`)??void 0}catch{return}},C=e=>e.owner===e.self.id?`host`:`guest`,w=(e,t)=>{for(let n of s)n(e,t)},T=async e=>{let t=await e.members().catch(()=>void 0);r!==e||n.status!==`active`||t&&y({...n,members:t.length})},E=e=>{!r||n.status!==`active`||Jd(e)&&n.role!==`host`||r.send(Zd(e)).catch(()=>{})},D=()=>{if(!r||n.status!==`active`||n.role!==`guest`)return;let e=r,t=[];m=t;for(let n=0;n<5;n++)setTimeout(()=>{if(m!==t||r!==e)return;let n=Date.now(),i=_++;g.set(i,n),setTimeout(()=>g.delete(i),pf),E({t:`ping`,n:i,at:n})},n*400);setTimeout(()=>{if(m!==t||r!==e)return;m=void 0;let n=df(t);n&&(p=n)},5*400+pf)},O=()=>({t:`state`,path:a.path,y:a.y,...a.playback?{s:lf(a.playback,a.playbackAt??Date.now(),Date.now())}:{}}),k=()=>{let e=u.get(`state`),t=u.get(`scroll`);if(e?.t!==`state`||t?.t!==`scroll`)return e;let n=[...u.keys()];return n.indexOf(`scroll`)>n.indexOf(`state`)?{...e,y:t.y}:e},A=()=>{i?.(),i=void 0,r=void 0,c&&clearInterval(c),c=void 0,l&&clearInterval(l),l=void 0,h&&clearInterval(h),h=void 0,m=void 0,p=void 0,g.clear()},j=async e=>{r=e;let t=C(e);if(d.clear(),f.length=0,y({status:`active`,role:t,invite:e.invite,members:1,self:e.self.id,owner:e.owner}),b(e.invite),i=await e.on(n=>{if(r===e)switch(n.type){case`message`:{let r=Qd(n.message.text);if(!r)return;let i=n.message.from,a=i===e.self.id;if(r.t===`ping`){t===`host`&&!a&&E({t:`pong`,n:r.n,at:r.at,host:Date.now()});return}if(r.t===`pong`){if(t!==`guest`||i!==e.owner)return;let n=g.get(r.n);if(n===void 0||n!==r.at)return;g.delete(r.n);let a=uf(n,r.host,Date.now());if(a.rtt>4e3)return;m?.push(a),p||=a;return}if(Jd(r)){if(i!==e.owner||t===`host`)return;u.delete(r.t),u.set(r.t,r),w(r,{replayed:!1,from:i,self:a});return}r.t===`name`&&d.set(i,r.name),r.t===`chat`&&(f.push({seq:n.message.seq,from:i,name:d.get(i),text:r.text,at:n.message.at,self:a}),f.length>200&&f.splice(0,f.length-200)),w(r,{replayed:!1,from:i,self:a});return}case`joined`:t===`host`&&E(O()),v&&E({t:`name`,name:v}),T(e);return;case`left`:if(t===`guest`&&n.id===e.owner){M(`host-left`);return}T(e);return}}),r!==e){i(),i=void 0;return}t===`host`&&(c=setInterval(()=>E(O()),gf)),t===`guest`&&(D(),h=setInterval(D,vf)),l=setInterval(()=>{v&&E({t:`name`,name:v})},_f),v&&E({t:`name`,name:v}),T(e),e.closed.then(({reason:t})=>{r===e&&(A(),x(),y({status:`ended`,reason:t}))})},M=async e=>{let t=r;A(),x(),y({status:`ended`,reason:e}),await t?.leave().catch(()=>{})},N=(e,t)=>{if(x(),t){y({status:`idle`});return}y({status:`failed`,code:bf(e)?e.code:`unknown`})},P=async(e,t,n=!1)=>{r&&await M(`left`),u.clear(),y({status:`joining`,invite:e??``});try{let e=await t();await j(e)}catch(e){N(e,n)}};return{getState:()=>n,subscribe:e=>(o.add(e),()=>{o.delete(e)}),onMessage:e=>(s.add(e),()=>{s.delete(e)}),create:()=>P(void 0,()=>e.create()),join:t=>P(t,()=>e.join(t)),resume:async()=>{let t=S();!t||r||await P(t,()=>e.join(t),!0)},leave:async()=>{r&&await M(`left`)},send:E,setLocation:(e,t)=>{a.path=e,a.y=t},setPlayback:e=>{a.playback=e,a.playbackAt=Date.now()},invite:()=>n.status===`active`?n.invite:void 0,hostClock:()=>p,hostPath:()=>[...u.values()].filter(e=>`path`in e).at(-1)?.path,replay:()=>{for(let e of[`state`,`nav`,`scroll`,`playback`]){let t=e===`state`?k():u.get(e);t&&r&&w(t,{replayed:!0,from:r.owner,self:!1})}},nameOf:e=>d.get(e),roster:async()=>{if(!r)return[];let e=r;return(await e.members().catch(()=>[])).map(t=>({id:t.id,name:d.get(t.id),host:t.id===e.owner,self:t.id===e.self.id}))},chat:()=>f.slice(),setName:e=>{v=e;try{e?t?.setItem(hf,e):t?.removeItem(hf)}catch{}e&&E({t:`name`,name:e})},name:()=>v,kick:async e=>{r&&n.status===`active`&&n.role===`host`&&await r.remove(e)},ban:async e=>{r&&n.status===`active`&&n.role===`host`&&await r.block(e)},playing:()=>!!(a.playback&&!a.playback.paused),dismiss:()=>{(n.status===`ended`||n.status===`failed`)&&y({status:`idle`})}}},Sf=`/party`,Cf=(e,t)=>`${e}${Sf}#${Tf(e,t)}`,wf=(e,t)=>{let n=e.startsWith(`#`)?e.slice(1):e,r;try{r=decodeURIComponent(n).trim()}catch{return}if(Of.test(r))return r;if(!kf.test(r))return;let i=r.indexOf(`.`),a=`${r.slice(0,i)}.${t}/${r.slice(i+1)}`;return Of.test(a)?a:void 0},Tf=(e,t)=>{let n=t.indexOf(`.`),r=t.slice(n+1),i=r.lastIndexOf(`/`);return i>0&&r.slice(0,i)===e?`${t.slice(0,n)}.${r.slice(i+1)}`:t},Ef=`[A-Za-z0-9_-]{43}`,Df=`[a-z0-9][a-z0-9._-]{0,63}`,Of=RegExp(`^${Ef}\\.[\\x21-\\x7e]{1,256}\\/${Df}$`),kf=RegExp(`^${Ef}\\.${Df}$`),$=xf(n);I();var Af=()=>{let[e,t]=V($.getState);return H(()=>$.subscribe(t),[]),e},jf=e=>{let[t]=V(()=>({current:e}));t.current=e,H(()=>$.onMessage((e,n)=>t.current(e,n)),[])};I();var Mf=l`
115
- display: flex;
116
- align-items: center;
117
- gap: 0.6rem;
118
- height: 4rem;
119
- padding: 0 1.2rem;
120
- border: 1px solid rgba(255, 255, 255, 0.15);
121
- border-radius: 2rem;
122
- background: transparent;
123
- color: rgba(255, 255, 255, 0.6);
124
- font-family: inherit;
125
- font-size: 1.3rem;
126
- font-weight: 600;
127
- white-space: nowrap;
128
- cursor: pointer;
129
- transition: all 0.15s;
130
-
131
- &:hover, &[aria-expanded='true'] {
132
- color: rgba(255, 255, 255, 0.9);
133
- border-color: rgba(255, 255, 255, 0.35);
134
- }
135
-
136
- &.live {
137
- border-color: rgba(74, 222, 128, 0.5);
138
- color: #4ade80;
139
- }
140
-
141
- &.live:hover, &.live[aria-expanded='true'] {
142
- border-color: #4ade80;
143
- }
144
-
145
- &.over {
146
- border-color: rgba(251, 146, 60, 0.5);
147
- color: #fb923c;
148
- }
149
-
150
- .count {
151
- font-weight: 500;
152
- opacity: 0.8;
153
- }
154
-
155
- @media (max-width: 768px) {
156
- padding: 0 1rem;
157
- .label { display: none; }
158
- }
159
- `,Nf=l`
160
- width: 30rem;
161
- padding: 1.2rem;
162
- border-radius: 0.8rem;
163
- border: 1px solid rgba(255, 255, 255, 0.12);
164
- background: #1a1a1a;
165
- color: rgba(255, 255, 255, 0.85);
166
- font-size: 1.3rem;
167
- box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
168
- z-index: ${zd.headerPopup};
169
-
170
- .title {
171
- font-size: 1.4rem;
172
- font-weight: 600;
173
- color: #fff;
174
- }
175
-
176
- .hint {
177
- margin-top: 0.4rem;
178
- color: rgba(255, 255, 255, 0.5);
179
- line-height: 1.4;
180
- }
181
-
182
- .link {
183
- display: flex;
184
- align-items: center;
185
- gap: 0.6rem;
186
- margin-top: 1rem;
187
- padding: 0.6rem 0.8rem;
188
- border-radius: 0.5rem;
189
- background: rgba(255, 255, 255, 0.06);
190
- }
191
-
192
- .link input {
193
- flex: 1;
194
- min-width: 0;
195
- border: none;
196
- background: transparent;
197
- color: rgba(255, 255, 255, 0.85);
198
- font-family: inherit;
199
- font-size: 1.2rem;
200
- outline: none;
201
- }
202
-
203
- .actions {
204
- display: flex;
205
- gap: 0.6rem;
206
- margin-top: 1rem;
207
- }
208
-
209
- button {
210
- display: inline-flex;
211
- align-items: center;
212
- gap: 0.5rem;
213
- padding: 0.6rem 1rem;
214
- border: 1px solid rgba(255, 255, 255, 0.15);
215
- border-radius: 0.5rem;
216
- background: transparent;
217
- color: rgba(255, 255, 255, 0.85);
218
- font-family: inherit;
219
- font-size: 1.2rem;
220
- cursor: pointer;
221
- }
222
-
223
- button:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
224
- button.primary { background: rgba(255, 255, 255, 0.1); }
225
- `,Pf={"not-found":`That party has ended.`,"bad-key":`That invite link is not valid.`,invalid:`That invite link is broken.`,full:`That party is full.`,blocked:`You cannot join that party.`,unavailable:`Parties are not available right now. Is FKN connected?`,"rate-limited":`Too many attempts. Try again in a moment.`},Ff={"host-left":`The host left the party.`,removed:`You were removed from the party.`,blocked:`You were removed from the party.`,ended:`The party ended.`,unavailable:`The party was lost. Parties are unavailable right now.`,left:`You left the party.`},If=()=>{let e=Af(),[t,n]=V(!1),[r,i]=V(!1),[,a]=mo(),o=()=>{n(!1),a(X(Y.PARTY))},{refs:s,floatingStyles:c,context:l}=bd({open:t,onOpenChange:n,placement:`bottom-end`,whileElementsMounted:_,middleware:[Ql(8),eu(),$l({padding:12})]}),{getReferenceProps:u,getFloatingProps:d}=Sd([md(l),vd(l),wd(l,{role:`dialog`})]);H(()=>{if(!r)return;let e=setTimeout(()=>i(!1),1500);return()=>clearTimeout(e)},[r]),H(()=>{(e.status===`ended`||e.status===`failed`)&&n(!0)},[e.status]);let f=e.status===`active`?Cf(location.origin,e.invite):void 0,p=async()=>{if(f)try{await navigator.clipboard.writeText(f),i(!0)}catch{}};if(e.status===`idle`)return g(`button`,{type:`button`,css:Mf,onClick:()=>{$.create()},title:`Watch together`,children:[j(xc,{size:16}),j(`span`,{className:`label`,children:`Watch together`})]});let m=e.status===`active`,h=e.status===`joining`?`Joining…`:e.status===`active`?e.role===`host`?`Hosting`:`Following`:e.status===`ended`?`Party over`:`Party failed`;return g(C,{children:[g(`button`,{type:`button`,ref:s.setReference,css:Mf,className:m?`live`:e.status===`joining`?void 0:`over`,...u(),children:[m&&e.role===`host`?j(hc,{size:16}):j(xc,{size:16}),j(`span`,{className:`label`,children:h}),m&&j(`span`,{className:`count`,children:e.members})]}),t&&j(Ju,{children:j(ad,{context:l,modal:!1,children:g(`div`,{ref:s.setFloating,css:Nf,style:c,...d(),children:[e.status===`joining`&&j(`div`,{className:`title`,children:`Joining the party…`}),e.status===`active`&&e.role===`host`&&g(C,{children:[j(`div`,{className:`title`,children:`You are hosting`}),g(`div`,{className:`hint`,children:[e.members===1?`Nobody has joined yet.`:`${e.members-1} ${e.members===2?`person is`:`people are`} following you.`,` `,`Everyone who opens this link follows you around and watches what you play.`]}),g(`div`,{className:`link`,children:[j(`input`,{readOnly:!0,value:f,"aria-label":`Invite link`,onFocus:e=>e.currentTarget.select()}),j(`button`,{type:`button`,onClick:()=>{p()},"aria-label":`Copy invite link`,children:j(r?$s:rc,{size:14})})]}),g(`div`,{className:`actions`,children:[g(`button`,{type:`button`,className:`primary`,onClick:o,children:[j(xc,{size:14}),` Party`]}),g(`button`,{type:`button`,onClick:()=>{$.leave(),n(!1)},children:[j(lc,{size:14}),` End party`]})]})]}),e.status===`active`&&e.role===`guest`&&g(C,{children:[j(`div`,{className:`title`,children:`You are following the host`}),g(`div`,{className:`hint`,children:[e.members,` in the party. The host decides where the party goes and what plays. Wander off if you like, and catch up when you want back.`]}),g(`div`,{className:`actions`,children:[j(`button`,{type:`button`,className:`primary`,onClick:()=>{$.replay(),n(!1)},children:`Catch up`}),g(`button`,{type:`button`,onClick:o,children:[j(xc,{size:14}),` Party`]}),g(`button`,{type:`button`,onClick:()=>{$.leave(),n(!1)},children:[j(lc,{size:14}),` Leave`]})]})]}),(e.status===`ended`||e.status===`failed`)&&g(C,{children:[j(`div`,{className:`title`,children:e.status===`ended`?Ff[e.reason]??`The party ended.`:Pf[e.code]??`The party could not start.`}),j(`div`,{className:`actions`,children:j(`button`,{type:`button`,className:`primary`,onClick:()=>{$.dismiss(),n(!1)},children:`OK`})})]})]})})})]})};I();var Lf=l`
226
- position: fixed;
227
- /* the FKN broker's docked bar reserves the page's top strip with a root margin, which cannot
228
- move a fixed element; the variable is its half of the contract and reads 0 everywhere else */
229
- top: var(--fkn-inset-top, 0px);
230
- left: 0;
231
- right: 0;
232
- /* the bar itself; what its controls OPEN is layer.headerPopup, since a portalled menu inherits
233
- nothing from this one */
234
- z-index: ${zd.header};
235
- /* three tracks rather than a flex row: the search field stays centred on the VIEWPORT whatever the
236
- wordmark and the action cluster happen to measure, which auto margins on a flex item cannot promise */
237
- display: grid;
238
- grid-template-columns: 1fr minmax(0, 32rem) 1fr;
239
- align-items: center;
240
- gap: 2rem;
241
- /* an explicit height rather than padding, so --stub-header-height IS the bar rather than a number
242
- kept in sync with one */
243
- height: var(--stub-header-height);
244
- padding: 0 3rem;
245
- background: linear-gradient(180deg, rgba(15, 15, 15, 0.95) 0%, rgba(15, 15, 15, 0.55) 55%, rgba(15, 15, 15, 0) 100%);
246
- pointer-events: none;
247
-
248
- & > * {
249
- pointer-events: auto;
250
- }
251
-
252
- /* Docked rather than floating: /watch reserves this strip with its own top padding, so the bar sits
253
- ON the page instead of over it and the gradient has nothing left to fade across. It stays fixed,
254
- because "docked" here is about what is underneath it, not about scrolling away. Opaque and edged,
255
- since the thing below is the source's own player chrome and the two need a seam.
256
-
257
- The border costs no height: box-sizing is border-box globally, so --stub-header-height still IS
258
- the bar, which is what the pages reserving it measure. */
259
- &.docked {
260
- background: #0f0f0f;
261
- border-bottom: 1px solid rgba(255, 255, 255, 0.08);
262
- pointer-events: auto;
263
- }
264
-
265
- .logo {
266
- justify-self: start;
267
- font-size: 2.4rem;
268
- font-weight: 800;
269
- letter-spacing: 0.05em;
270
- color: #fff;
271
-
272
- &:hover {
273
- color: #fff;
274
- }
275
- }
276
-
277
- .actions {
278
- justify-self: end;
279
- display: flex;
280
- align-items: center;
281
- gap: 1.2rem;
282
- }
283
-
284
- .icon-button {
285
- display: flex;
286
- align-items: center;
287
- justify-content: center;
288
- flex-shrink: 0;
289
- width: 4rem;
290
- height: 4rem;
291
- border: 1px solid rgba(255, 255, 255, 0.15);
292
- border-radius: 50%;
293
- background: transparent;
294
- color: rgba(255, 255, 255, 0.6);
295
- transition: all 0.15s;
296
-
297
- &:hover {
298
- color: rgba(255, 255, 255, 0.9);
299
- border-color: rgba(255, 255, 255, 0.35);
300
- }
301
- }
302
-
303
- /* The whole pill is the field. The inset belongs to the INPUT rather than to this box: padding here
304
- is the form's own, so a click landing in it hits the form and sets no caret, and the field only
305
- took 19px of the bar's 38 that way. The glyph is drawn over the field instead of beside it, so
306
- the space it occupies stays part of the target. */
307
- .search {
308
- position: relative;
309
- display: flex;
310
- align-items: center;
311
- width: 100%;
312
- background: rgba(35, 35, 35, 0.85);
313
- border: 1px solid rgba(255, 255, 255, 0.1);
314
- border-radius: 0.8rem;
315
- backdrop-filter: blur(8px);
316
- transition: border-color 0.2s ease, background 0.2s ease;
317
-
318
- &:focus-within {
319
- border-color: rgba(255, 255, 255, 0.35);
320
- background: rgba(35, 35, 35, 0.95);
321
- }
322
-
323
- svg {
324
- position: absolute;
325
- left: 1.4rem;
326
- top: 50%;
327
- transform: translateY(-50%);
328
- /* it labels the field, it is not a target of its own: a click on it belongs to the input under it */
329
- pointer-events: none;
330
- color: rgba(255, 255, 255, 0.6);
331
- }
332
-
333
- input {
334
- width: 100%;
335
- /* left clears the glyph: 1.4rem to it, its own 2rem, then the 0.8rem the flex gap used to give */
336
- padding: 0.8rem 1.4rem 0.8rem 4.2rem;
337
- background: transparent;
338
- border: none;
339
- outline: none;
340
- color: #fff;
341
- font-family: inherit;
342
- font-size: 1.5rem;
343
-
344
- &::placeholder {
345
- color: rgba(255, 255, 255, 0.4);
346
- }
347
- }
348
- }
349
-
350
- @media (max-width: 768px) {
351
- /* the outer tracks collapse to their content and the search takes what is left: centring it on
352
- the viewport costs more width than the viewport has */
353
- grid-template-columns: auto minmax(0, 1fr) auto;
354
- gap: 1rem;
355
- padding: 0 1.5rem;
356
-
357
- .logo {
358
- font-size: 2rem;
359
- }
360
-
361
- .actions {
362
- gap: 0.8rem;
363
- }
364
-
365
- .icon-button {
366
- width: 3.4rem;
367
- height: 3.4rem;
368
- }
369
-
370
- .search {
371
- svg {
372
- left: 1rem;
373
- }
374
-
375
- input {
376
- padding: 0.6rem 1rem 0.6rem 3.8rem;
377
- font-size: 1.4rem;
378
- }
379
- }
380
- }
381
- `,Rf=()=>{let[,e]=mo(),[t]=_o(Do(Y.LOGIN_CALLBACK)),[n]=_o(Do(Y.WATCH)),r=ls(ho()),i=r.query,a=z(r);a.current=r;let[o,s]=V(i),c=z(null),l=z(void 0);H(()=>{document.activeElement!==c.current&&i!==o&&s(i)},[i]);let u=(t,n)=>{let r=t.trim();r&&e(ps({...a.current,query:r}),{replace:n})};return t?null:g(`header`,{css:Lf,className:n?`docked`:void 0,children:[j(J,{to:X(Y.HOME),className:`logo`,onClick:Pc,children:`stub`}),g(`form`,{className:`search`,onSubmit:e=>{e.preventDefault(),l.current&&clearTimeout(l.current),u(o,!1),c.current?.blur()},children:[j(gc,{size:20}),j(`input`,{ref:c,type:`text`,value:o,placeholder:`Search anime, shows, movies…`,"aria-label":`Search`,onInput:e=>{let t=e.currentTarget.value;s(t),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>u(t,!0),350)}})]}),g(`div`,{className:`actions`,children:[j(If,{}),j(J,{to:X(Y.SETTINGS),className:`icon-button`,"aria-label":`Settings`,title:`Settings`,children:j(vc,{size:20})}),j(Kd,{})]})]})},zf=l`
382
- display: flex;
383
- align-items: center;
384
- gap: 2rem;
385
- margin-top: 4rem;
386
- padding: 2.5rem 3rem;
387
- border-top: 1px solid rgba(255, 255, 255, 0.08);
388
-
389
- .wordmark {
390
- font-size: 1.8rem;
391
- font-weight: 800;
392
- letter-spacing: 0.05em;
393
- color: rgba(255, 255, 255, 0.8);
394
-
395
- &:hover {
396
- color: #fff;
397
- }
398
- }
399
-
400
- .version {
401
- margin-left: auto;
402
- font-size: 1.2rem;
403
- font-variant-numeric: tabular-nums;
404
- color: rgba(255, 255, 255, 0.35);
405
- }
406
-
407
- .commit {
408
- /* dimmer than the version: it identifies a build for a bug report, it is not a thing to read */
409
- font-family: ui-monospace, monospace;
410
- color: rgba(255, 255, 255, 0.25);
411
- }
412
-
413
- .nav-link {
414
- font-size: 1.4rem;
415
- white-space: nowrap;
416
- color: rgba(255, 255, 255, 0.55);
417
-
418
- &:hover {
419
- color: #fff;
420
- }
421
- }
422
-
423
- @media (max-width: 768px) {
424
- gap: 1.2rem;
425
- padding: 2rem 1.5rem;
426
- }
427
- `,Bf=()=>{let[e]=_o(Do(Y.WATCH)),[t]=_o(Do(Y.LOGIN_CALLBACK));return e||t?null:g(`footer`,{css:zf,children:[j(J,{to:X(Y.HOME),className:`wordmark`,onClick:Pc,children:`stub`}),j(J,{to:X(Y.LEGAL),className:`nav-link`,children:`Legal`}),j(J,{to:X(Y.PRIVACY),className:`nav-link`,children:`Privacy`}),g(`span`,{className:`version`,title:`stub v0.0.20, commit edef17f`,children:[`v`,`0.0.20`,` `,j(`span`,{className:`commit`,children:`edef17f`})]})]})};I();var Vf=l`
428
- position: fixed;
429
- inset: 0;
430
- /* a sibling of the modal's portal rather than a child of it, so it competes at the root and 200
431
- put it behind the modal on any /media route */
432
- z-index: ${zd.pluginPrompt};
433
- display: flex;
434
- align-items: center;
435
- justify-content: center;
436
- padding: 2rem;
437
- background: rgba(0, 0, 0, 0.6);
438
- backdrop-filter: blur(4px);
439
-
440
- .dialog {
441
- width: 100%;
442
- max-width: 44rem;
443
- padding: 2.4rem;
444
- border: 1px solid rgba(255, 255, 255, 0.12);
445
- border-radius: 0.8rem;
446
- background: #171717;
447
- }
448
-
449
- h2 {
450
- font-size: 1.9rem;
451
- margin-bottom: 0.6rem;
452
- }
453
-
454
- .intro {
455
- font-size: 1.4rem;
456
- line-height: 1.55;
457
- color: rgba(255, 255, 255, 0.7);
458
- }
459
-
460
- .list {
461
- display: flex;
462
- flex-direction: column;
463
- gap: 0.6rem;
464
- margin: 1.8rem 0;
465
- }
466
-
467
- .invite {
468
- display: flex;
469
- align-items: center;
470
- gap: 1rem;
471
- padding: 0.9rem 1.1rem;
472
- border: 1px solid rgba(255, 255, 255, 0.12);
473
- border-radius: 0.5rem;
474
- }
475
-
476
- .invite .uri {
477
- font-family: monospace;
478
- font-size: 1.3rem;
479
- overflow-wrap: anywhere;
480
- }
481
-
482
- .invite .state {
483
- margin-left: auto;
484
- font-size: 1.2rem;
485
- white-space: nowrap;
486
- color: rgba(255, 255, 255, 0.55);
487
- }
488
-
489
- .invite .state.error {
490
- color: #f87171;
491
- }
492
-
493
- .invite .dismiss {
494
- padding: 0.3rem 0.7rem;
495
- border: 1px solid rgba(255, 255, 255, 0.25);
496
- border-radius: 0.4rem;
497
- background: none;
498
- color: inherit;
499
- font-size: 1.2rem;
500
- cursor: pointer;
501
- }
502
-
503
- .actions {
504
- display: flex;
505
- align-items: center;
506
- justify-content: flex-end;
507
- gap: 1rem;
508
- }
509
-
510
- button {
511
- padding: 0.7rem 1.5rem;
512
- border: none;
513
- border-radius: 0.4rem;
514
- background: #fff;
515
- color: #000;
516
- font-weight: 600;
517
- font-size: 1.4rem;
518
- cursor: pointer;
519
- }
520
-
521
- button:disabled {
522
- opacity: 0.5;
523
- cursor: default;
524
- }
525
-
526
- .decline {
527
- border: 1px solid rgba(255, 255, 255, 0.25);
528
- background: none;
529
- color: inherit;
530
- font-weight: 400;
531
- }
532
- `,Hf=e=>e.state===`installing`?`adding…`:e.state===`error`?e.error??`failed`:``,Uf=()=>{let[e,t]=V(Ns);if(H(()=>(t(Ns()),Ms(()=>t(Ns()))),[]),!e.length)return null;let n=e.some(e=>e.state===`installing`);return j(`div`,{css:Vf,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`plugin-prompt-title`,children:g(`div`,{className:`dialog`,children:[j(`h2`,{id:`plugin-prompt-title`,children:e.length>1?`Add these sources?`:`Add this source?`}),g(`p`,{className:`intro`,children:[`This link was shared with `,e.length>1?`sources`:`a source`,` you have not added.`,` `,`Sources are community-made, installed through FKN, and run isolated from stub.`]}),j(`div`,{className:`list`,children:e.map(e=>g(`div`,{className:`invite`,children:[j(`span`,{className:`uri`,children:e.uri}),j(`span`,{className:`state${e.state===`error`?` error`:``}`,children:Hf(e)}),e.state===`error`&&j(`button`,{type:`button`,className:`dismiss`,onClick:()=>Rs(e.uri),children:`Dismiss`})]},e.uri))}),g(`div`,{className:`actions`,children:[j(`button`,{type:`button`,className:`decline`,disabled:n,onClick:()=>Is(),children:`Not now`}),j(`button`,{type:`button`,disabled:n,onClick:()=>{Ls()},children:e.length>1?`Add sources`:`Add source`})]})]})})},Wf={"\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n":Ro,"\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n":zo,"\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n":Bo,"\n subscription GetTheatherMedia($input: MediaInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n":Vo,"\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n":Ho,"\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n":Uo,"\n subscription GetWatchOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n }\n }\n":Wo,"\n fragment EpisodeFragment on Episode {\n _id\n uri\n origin\n id\n url\n mediaUri\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n mediaUri\n }\n }\n }\n":Fo,"\n fragment MediaFragment on Media {\n _id\n uri\n origin\n id\n url\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n }\n }\n }\n":Io,"\n fragment OriginFragment on Origin {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n":Lo};function Gf(e){return Wf[e]??{}}var Kf=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,qf=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,Jf=/\.(m3u8)($|\?)/i,Yf=/\.(mpd)($|\?)/i,Xf=/stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/,Zf=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,Qf=/vimeo\.com\/(?!progressive_redirect).+/,$f=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,ep=/open\.spotify\.com\/(\w+)\/(\w+)/i,tp=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/,np=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,rp=(e,t)=>{if(Array.isArray(e)){for(let n of e)if(typeof n==`string`&&rp(n,t)||rp(n.src,t))return!0;return!1}return t(e)},ip={html:e=>rp(e,e=>Kf.test(e)||qf.test(e)),hls:e=>rp(e,e=>Jf.test(e)),dash:e=>rp(e,e=>Yf.test(e)),mux:e=>Xf.test(e),youtube:e=>Zf.test(e),vimeo:e=>Qf.test(e)&&!qf.test(e)&&!Jf.test(e),wistia:e=>$f.test(e),spotify:e=>ep.test(e),twitch:e=>tp.test(e),tiktok:e=>np.test(e)};R();var ap=ce.forwardRef((e,t)=>{let n=Kf.test(`${e.src}`)?`audio`:`video`;return ce.createElement(n,{...e,ref:t},e.children)});R();var op=[{key:`hls`,name:`hls.js`,canPlay:ip.hls,canEnablePIP:()=>!0,player:ge(()=>xe(()=>import(`./react-DKSDz1wJ.js`),__vite__mapDeps([0,1,2,3,4])))},{key:`dash`,name:`dash.js`,canPlay:ip.dash,canEnablePIP:()=>!0,player:ge(()=>xe(()=>import(`./react-CLMfdUXR.js`),__vite__mapDeps([5,1,2,6,4])))},{key:`mux`,name:`Mux`,canPlay:ip.mux,canEnablePIP:()=>!0,player:ge(()=>xe(()=>import(`./dist-BgIerfpp.js`),__vite__mapDeps([7,1,2,8,3,4])))},{key:`youtube`,name:`YouTube`,canPlay:ip.youtube,player:ge(()=>xe(()=>import(`./react-bkM_mQGd.js`),__vite__mapDeps([9,1,2])))},{key:`vimeo`,name:`Vimeo`,canPlay:ip.vimeo,player:ge(()=>xe(()=>import(`./react-BDr8Ag8b.js`),__vite__mapDeps([10,1,2,8])))},{key:`wistia`,name:`Wistia`,canPlay:ip.wistia,canEnablePIP:()=>!0,player:ge(()=>xe(()=>import(`./react-CjmRCHoG.js`),__vite__mapDeps([11,1,2,6])))},{key:`spotify`,name:`Spotify`,canPlay:ip.spotify,canEnablePIP:()=>!1,player:ge(()=>xe(()=>import(`./react-BTju4bmn.js`),__vite__mapDeps([12,1,2])))},{key:`twitch`,name:`Twitch`,canPlay:ip.twitch,canEnablePIP:()=>!1,player:ge(()=>xe(()=>import(`./react-kPj0f67l.js`),__vite__mapDeps([13,1,2])))},{key:`tiktok`,name:`TikTok`,canPlay:ip.tiktok,canEnablePIP:()=>!1,player:ge(()=>xe(()=>import(`./react-Cs34a503.js`),__vite__mapDeps([14,1,2])))},{key:`html`,name:`html`,canPlay:ip.html,canEnablePIP:()=>!0,player:ap}],sp={width:`320px`,height:`180px`,volume:1,playbackRate:1,previewTabIndex:0,previewAriaLabel:``,oEmbedUrl:`https://noembed.com/embed?url={url}`};R();var cp=ce.forwardRef((e,t)=>{let{playing:n,pip:r}=e,i=e.activePlayer,a=z(null),o=z(!0);H(()=>{a.current&&(a.current.paused&&n===!0&&a.current.play(),!a.current.paused&&n===!1&&a.current.pause(),a.current.playbackRate=e.playbackRate??1,a.current.volume=e.volume??1)}),H(()=>{var e,t,n,i,o;if(!(!a.current||!globalThis.document)){if(r&&!document.pictureInPictureElement)try{(t=(e=a.current).requestPictureInPicture)==null||t.call(e)}catch{}if(!r&&document.pictureInPictureElement)try{(i=(n=a.current).exitPictureInPicture)==null||i.call(n),(o=document.exitPictureInPicture)==null||o.call(document)}catch{}}},[r]);let s=t=>{var n,r;o.current=!0,(n=e.onReady)==null||n.call(e),(r=e.onLoadStart)==null||r.call(e,t)},c=t=>{var n,r;o.current&&(o.current=!1,(n=e.onStart)==null||n.call(e,t)),(r=e.onPlay)==null||r.call(e,t)};if(!i)return null;let l={},u=[`onReady`,`onStart`];for(let t in e)t.startsWith(`on`)&&!u.includes(t)&&(l[t]=e[t]);return ce.createElement(i,{...l,style:e.style,className:e.className,slot:e.slot,ref:L(e=>{a.current=e,typeof t==`function`?t(e):t!==null&&(t.current=e)},[t]),src:e.src,crossOrigin:e.crossOrigin,preload:e.preload,controls:e.controls,muted:e.muted,autoPlay:e.autoPlay,loop:e.loop,playsInline:e.playsInline,config:e.config,onLoadStart:s,onPlay:c},e.children)});cp.displayName=`Player`;var lp=cp;R();var up=ge(()=>xe(()=>import(`./Preview-DG9nqCV0.js`),__vite__mapDeps([15,1,2]))),dp=[],fp=(e,t)=>{let n=n=>{for(let t of[...dp,...e])if(n&&t.canPlay(n))return t;return t||null},r=ce.forwardRef((e,t)=>{let r={...sp,...e},{src:i,slot:a,className:o,style:s,width:c,height:l,fallback:u,wrapper:d}=r,[f,p]=V(!!r.light);H(()=>{r.light?p(!0):p(!1)},[r.light]);let m=e=>{var t;p(!1),(t=r.onClickPreview)==null||t.call(r,e)},h=e=>{if(!e)return null;let{light:t,playIcon:n,previewTabIndex:i,oEmbedUrl:a,previewAriaLabel:o}=r;return ce.createElement(up,{src:e,light:t,playIcon:n,previewTabIndex:i,previewAriaLabel:o,oEmbedUrl:a,onClickPreview:m})},g=e=>{let i=n(e);if(!i)return null;let{style:s,width:c,height:l,wrapper:u}=r,d=r.config?.[i.key];return ce.createElement(lp,{...r,ref:t,activePlayer:i.player??i,slot:u?void 0:a,className:u?void 0:o,style:u?{display:`block`,width:`100%`,height:`100%`}:{display:`block`,width:c,height:l,...s},config:d})},_=d??pp,v=u===!1?pp:ae;return ce.createElement(_,{slot:a,className:o,style:{width:c,height:l,...s}},ce.createElement(v,{fallback:u},f?h(i):g(i)))});return r.displayName=`ReactPlayer`,r.addCustomPlayer=e=>{dp.push(e)},r.removeCustomPlayers=()=>{dp.length=0},r.canPlay=t=>{if(t){for(let n of[...dp,...e])if(n.canPlay(t))return!0}return!1},r.canEnablePIP=t=>{if(t){for(let n of[...dp,...e])if(n.canPlay(t)&&n.canEnablePIP?.call(n))return!0}return!1},r},pp=({children:e})=>e,mp=op[op.length-1],hp=fp(op,mp);R();var gp=l`
533
- position: absolute;
534
- top: 0;
535
- left: 0;
536
- width: 100%;
537
- height: 100%;
538
- overflow: hidden;
539
- `,_p=l`
540
- grid-area: container;
541
- height: 140vh !important;
542
- width: 100% !important;
543
- margin-top: -20vh;
544
- pointer-events: none;
545
- `,vp=({url:e,redirectTo:t,volume:n,paused:r=!1,onError:i,...a})=>{let[o,s]=V(null),[c,l]=V(!1),u=L(()=>{l(!0)},[l]),d=L(()=>{o?.play()},[o]),f=j(hp,{ref:e=>s(e),css:_p,onReady:u,controls:!1,src:e,loop:!0,volume:n,playing:!r,muted:n===0,style:{display:c?``:`none`},onError:i,onEnded:d});return j(`div`,{css:gp,...a,children:t?j(J,{to:t,children:f}):f})};R();var yp=({element:e,defaultValue:t})=>{let[n,r]=V(t),[i,a]=V(!1),o=L(t=>{if(a(!0),!e)return;let{clientX:n}=t,{left:i,right:o}=e.getBoundingClientRect();r(Math.min(Math.max((n-i)/(o-i),0),1))},[e]);return H(()=>{if(!i)return;let t=()=>a(!1),n=t=>{if(!e)return;let{clientX:n}=t,{left:i,right:a}=e.getBoundingClientRect();r(Math.min(Math.max((n-i)/(a-i),0),1))};return document.addEventListener(`mousemove`,n),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,n),document.removeEventListener(`mouseup`,t)}},[e,i]),{value:n,scrubbing:i,scrubHandler:o}};I();var bp=l`
546
- display: flex;
547
- align-items: center;
548
- justify-content: center;
549
- gap: 0.5rem;
550
-
551
- & > button.volume-icon {
552
- position: relative;
553
- width: 3rem;
554
- height: 3rem;
555
- cursor: pointer;
556
- background-color: transparent;
557
- border: none;
558
- outline: none;
559
- .icon-body {
560
- position: absolute;
561
- top: 50%;
562
- left: 50%;
563
- transform: translate(-50%, -50%);
564
- }
565
- .icon-outline {
566
- position: absolute;
567
- top: 50%;
568
- left: 50%;
569
- transform: translate(-50%, -50%);
570
- }
571
- }
572
-
573
- .volume-area {
574
- display: flex;
575
- cursor: pointer;
576
- color: #fff;
577
-
578
- .mute-button {
579
- color: #fff;
580
- border: none;
581
- background: none;
582
- height: 100%;
583
- width: 4.8rem;
584
- cursor: pointer;
585
- }
586
-
587
- .volume-panel {
588
- display: inline-block;
589
- width: 0;
590
- /* width: 100%; */
591
- /* width: 12rem; */
592
- height: 100%;
593
- -webkit-transition: margin .2s cubic-bezier(0.4,0,1,1),width .2s cubic-bezier(0.4,0,1,1);
594
- transition: margin .2s cubic-bezier(0.4,0,1,1),width .2s cubic-bezier(0.4,0,1,1);
595
- cursor: pointer;
596
- outline: 0;
597
-
598
- &.volume-control-hover {
599
- width: 6rem;
600
- /* width: 52px; */
601
- margin-right: 3px;
602
- -webkit-transition: margin .2s cubic-bezier(0,0,0.2,1),width .2s cubic-bezier(0,0,0.2,1);
603
- transition: margin .2s cubic-bezier(0,0,0.2,1),width .2s cubic-bezier(0,0,0.2,1);
604
- }
605
-
606
- .slider {
607
- height: 100%;
608
- min-height: 36px;
609
- position: relative;
610
- overflow: hidden;
611
-
612
- .slider-handle {
613
- /* left: 40px; */
614
- position: absolute;
615
- top: 50%;
616
- width: 12px;
617
- height: 12px;
618
- border-radius: 6px;
619
- margin-top: -6px;
620
- margin-left: -5px;
621
- /* background: #fff; */
622
- }
623
- .slider-handle::before, .slider-handle::after {
624
- content: "";
625
- position: absolute;
626
- display: block;
627
- top: 50%;
628
- left: 0;
629
- height: 3px;
630
- margin-top: -2px;
631
- width: 64px;
632
- }
633
- .slider-handle::before {
634
- left: -58px;
635
- background: #fff;
636
- border: 0.1rem solid #000;
637
- }
638
- .slider-handle::after {
639
- left: 6px;
640
- background: rgba(255,255,255,.2);
641
- border: 0.1rem solid #000;
642
- }
643
- }
644
- }
645
- }
646
- }
647
- `,xp=({defaultMuted:e=!0,defaultVolume:t=1,onMutedUpdate:n,onVolumeUpdate:r})=>{let[i,a]=V(t),[o,s]=V(e),[c,l]=V(null),[u,d]=V(!0),{scrubHandler:f,value:p}=yp({element:c,defaultValue:i});H(()=>{p!==void 0&&(a(p),r(p**2,p))},[a,p]);let m=L(()=>{p!==void 0&&(s(e=>!e),n(!o))},[s,a,p,o]),h=L(()=>{d(!1)},[d]),_=L(e=>{d(!0)},[d]),v=o?wc:(i??0)>.66?Cc:(i??0)>.33?Sc:(i??0)>0?Tc:wc;return g(`div`,{css:bp,onMouseLeave:_,children:[j(`button`,{className:`volume-icon`,onClick:m,onMouseOver:h,children:g(C,{children:[j(v,{className:`icon-outline`,size:30,strokeWidth:3,color:`black`}),j(v,{className:`icon-body`,size:30})]})}),j(`div`,{className:`volume-area`,onMouseOver:h,children:j(`div`,{ref:e=>l(e),className:`volume-panel${u?``:` volume-control-hover`}`,onMouseDown:f,children:j(`div`,{className:`slider`,children:j(`div`,{className:`slider-handle`,style:{left:`${(i??0)*100}%`}})})})})]})};I();var Sp=l`
648
- display: -webkit-box;
649
- -webkit-box-orient: vertical;
650
- overflow: hidden;
651
- text-overflow: ellipsis;
652
- width: 100%;
653
- height: 100%;
654
- `,Cp=({children:e,...t})=>{let[n,r]=V(null),[i,a]=V(0),[o,s]=V(0);return H(()=>{if(!n)return;let e=0,t=()=>{let e=window.getComputedStyle(n),t;t=e.lineHeight===`normal`?parseFloat(e.fontSize)*1.2:parseFloat(e.lineHeight);let r=n.clientHeight;if(a(e=>e===t?e:t),t&&r){let e=Math.max(1,Math.floor(r/t));s(t=>t===e?t:e)}},r=new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(t)});return r.observe(n),()=>{cancelAnimationFrame(e),r.disconnect()}},[n]),j(`div`,{...t,ref:r,css:Sp,style:{...typeof t.style==`object`?t.style:void 0,WebkitLineClamp:o,height:i&&o?o*i:void 0},children:e})},wp=e=>e._id??e.uri??``,Tp=e=>{let t=e.filter(e=>e.titles?.length&&e.shortDescriptions?.length),n=t.filter(e=>e.trailers?.length);return n.length?n:t},Ep=(e,t,n=[],r=e=>Math.floor(Math.random()*e))=>{let i=e.slice(0,10).filter(e=>!n.includes(wp(e))),a=t&&i.find(e=>wp(e)===t);if(a)return a;if(i.length)return i[Math.min(i.length-1,Math.max(0,r(i.length)))]};R();var Dp=l`
655
- height: 70vh;
656
- .player-wrapper {
657
- position: absolute;
658
- width: 100%;
659
- height: calc(100vh - 5rem);
660
- user-select: none;
661
-
662
- youtube-video {
663
- height: 250vh !important;
664
- width: 100% !important;
665
- margin-top: -75vh;
666
- }
667
-
668
- .shadow {
669
- position: absolute;
670
- bottom: 0;
671
- left: 0;
672
- right: 0;
673
- width: 100%;
674
- height: 30vh;
675
-
676
- background:
677
- linear-gradient(
678
- 0deg,
679
- rgba(15, 15, 15, 1) 0%,
680
- rgba(15, 15, 15, 0.5) calc(100% - 10rem),
681
- rgba(15, 15, 15, 0) 100%
682
- );
683
- }
684
- }
685
-
686
- .information {
687
- position: absolute;
688
- inset: 0;
689
- left: 10rem;
690
- max-width: 75rem;
691
- display: flex;
692
- flex-direction: column;
693
- align-items: start;
694
- justify-content: center;
695
- text-shadow: rgb(0 0 0 / 80%) -1px -1px 0, rgb(0 0 0 / 80%) -1px 1px 0, rgb(0 0 0 / 80%) 1px -1px 0, rgb(0 0 0 / 80%) 1px 1px 0;
696
-
697
- .player-controls {
698
- padding: 2.5rem 0;
699
- display: flex;
700
- align-items: center;
701
- gap: 1rem;
702
-
703
- & > span {
704
- position: relative;
705
- width: 3rem;
706
- height: 3rem;
707
- cursor: pointer;
708
-
709
- .icon-body {
710
- position: absolute;
711
- top: 50%;
712
- left: 50%;
713
- transform: translate(-50%, -50%);
714
- }
715
- .icon-outline {
716
- position: absolute;
717
- top: 50%;
718
- left: 50%;
719
- transform: translate(-50%, -50%);
720
- }
721
- }
722
- }
723
-
724
- .title {
725
- font-size: 4rem;
726
- font-weight: bold;
727
- margin-bottom: 1rem;
728
- cursor: default;
729
- }
730
-
731
- .short-description {
732
- font-size: 2rem;
733
- margin-bottom: 1rem;
734
- cursor: default;
735
- overflow: hidden;
736
- max-height: 10rem;
737
- white-space: pre-wrap;
738
- }
739
- }
740
-
741
- @media (max-width: 768px) {
742
- height: 56vh;
743
-
744
- .information {
745
- left: 1.5rem;
746
- right: 1.5rem;
747
- max-width: none;
748
-
749
- .player-controls {
750
- padding: 1.5rem 0;
751
- }
752
-
753
- .title {
754
- font-size: 2.6rem;
755
- }
756
-
757
- .short-description {
758
- font-size: 1.5rem;
759
- max-height: 8rem;
760
- }
761
- }
762
- }
763
- `,Op=Gf(`
764
- subscription GetTheatherMedia($input: MediaInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {
765
- media(input: $input) {
766
- ...MediaFragment
767
- titles {
768
- language
769
- title
770
- score
771
- }
772
- shortDescriptions(input: $shortDescriptionInput) {
773
- language
774
- shortDescription
775
- }
776
- covers {
777
- language
778
- url
779
- }
780
- banners {
781
- language
782
- url
783
- }
784
- trailers {
785
- uri
786
- origin
787
- id
788
- url
789
- thumbnail
790
- }
791
- popularity
792
- }
793
- }
794
- `),kp=({mediaNodes:e})=>{let[t]=_o(Do(Y.MEDIA)),[n,r]=V([]),i=B(()=>Tp(e),[e]),a=z(void 0),o=B(()=>{let e=Ep(i,a.current,n);return a.current=e?wp(e):void 0,e},[i,n]),[{data:s}]=kn({query:Op,variables:{input:{uri:o?.uri},shortDescriptionInput:{count:1}},pause:!o}),c=s?.media??o,l=B(()=>c?.titles?.at(0)?.title,[c]),u=B(()=>c?.shortDescriptions?.at(0)?.shortDescription,[c]),d=B(()=>c?.trailers?.at(0),[c]),[f,p]=V(!1),[m,h]=V(!0),[_,v]=V(.25),y=L(()=>{let e=o&&wp(o);e&&r(t=>t.includes(e)?t:[...t,e])},[o]);return g(`div`,{css:Dp,className:`theater`,children:[g(`div`,{className:`player-wrapper`,children:[d?.url&&j(vp,{url:d.url,paused:f||t,onError:y,volume:m?0:_,className:`player`}),j(`div`,{className:`shadow`})]}),g(`div`,{className:`information`,css:Dp,children:[g(`div`,{className:`player-controls`,children:[g(`span`,{className:`playback`,children:[f?j(mc,{className:`icon-outline`,size:30,strokeWidth:3,color:`black`,onClick:()=>p(!1)}):j(pc,{className:`icon-outline`,size:30,strokeWidth:3,color:`black`,onClick:()=>p(!0)}),f?j(mc,{className:`icon-body`,size:30,onClick:()=>p(!1)}):j(pc,{className:`icon-body`,size:30,onClick:()=>p(!0)})]}),j(xp,{defaultMuted:m,onMutedUpdate:h,defaultVolume:_,onVolumeUpdate:e=>v(e)})]}),j(`div`,{className:`title`,children:l}),j(Cp,{className:`short-description`,children:u})]})]})};R();function Ap(e){let t=e;for(;t;){if(t.dir)return t.dir===`rtl`;t=t.parentElement}return!1}function jp(e,t){let[n,r]=V(t===`rtl`);return se(()=>{e&&(t||r(Ap(e)))},[t,e]),n}var Mp=typeof window<`u`?se:H;function Np(e){if(e!==void 0)switch(typeof e){case`number`:return e;case`string`:if(e.endsWith(`px`))return parseFloat(e);break}}function Pp({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:i,mode:a,style:o}){let{styleHeight:s,styleWidth:c}=B(()=>({styleHeight:Np(o?.height),styleWidth:Np(o?.width)}),[o?.height,o?.width]),[l,u]=V({height:t,width:n}),d=r||a===`only-height`&&s!==void 0||a===`only-width`&&c!==void 0||s!==void 0&&c!==void 0;return Mp(()=>{if(i===null||d)return;let t=new ResizeObserver(e=>{for(let t of e){let{contentRect:e,target:n}=t;i===n&&u(t=>t.height===e.height&&t.width===e.width?t:{height:e.height,width:e.width})}});return t.observe(i,{box:e}),()=>{t?.unobserve(i)}},[e,d,i,s,c]),B(()=>({height:s??l.height,width:c??l.width}),[l,s,c])}function Fp(e){let t=z(()=>{throw Error(`Cannot call an event handler while rendering.`)});return Mp(()=>{t.current=e},[e]),L(e=>t.current?.(e),[t])}var Ip=null;function Lp(e=!1){if(Ip===null||e){let e=document.createElement(`div`),t=e.style;t.width=`50px`,t.height=`50px`,t.overflow=`scroll`,t.direction=`rtl`;let n=document.createElement(`div`),r=n.style;return r.width=`100px`,r.height=`100px`,e.appendChild(n),document.body.appendChild(e),e.scrollLeft>0?Ip=`positive-descending`:(e.scrollLeft=1,Ip=e.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(e),Ip}return Ip}function Rp({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){if(t===`horizontal`&&n)switch(Lp()){case`negative`:return-r;case`positive-descending`:if(e){let{clientWidth:t,scrollLeft:n,scrollWidth:r}=e;return r-t-n}break}return r}function zp(e,t=`Assertion error`){if(!e)throw console.error(t),Error(t)}function Bp({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n==`number`)return t*n;{let n=e.get(e.size===0?0:e.size-1);return zp(n!==void 0,`Unexpected bounds cache miss`),t*((n.scrollOffset+n.size)/e.size)}}function Vp({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:i,containerScrollOffset:a,containerSize:o}){let s=Bp({cachedBounds:t,itemCount:r,itemSize:i}),c=t.get(n),l=Math.max(0,Math.min(s-o,c.scrollOffset)),u=Math.max(0,c.scrollOffset-o+c.size);switch(e===`smart`&&(e=a>=u&&a<=l?`auto`:`center`),e){case`start`:return l;case`end`:return u;case`center`:return c.scrollOffset<=o/2?0:c.scrollOffset+c.size/2>=s-o/2?s-o:c.scrollOffset+c.size/2-o/2;default:return a>=u&&a<=l?a:a<u?u:l}}function Hp({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:i}){let a=r-1,o=0,s=-1,c=0;for(;c<a;){let n=e.get(c);if(n.scrollOffset+n.size>t)break;c++}for(o=c,o=Math.max(0,o-i);c<a;){let r=e.get(c);if(r.scrollOffset+r.size>=t+n)break;c++}return s=Math.min(a,c),s=Math.min(r-1,s+i),o<0?[0,-1]:[o,s]}function Up({itemCount:e,itemProps:t,itemSize:n}){let r=new Map;return{get(i){for(zp(i<e,`Invalid index ${i}`);r.size-1<i;){let e=r.size,a;switch(typeof n){case`function`:a=n(e,t);break;case`number`:a=n;break}if(e===0)r.set(e,{size:a,scrollOffset:0});else{let t=r.get(e-1);zp(t!==void 0,`Unexpected bounds cache miss for index ${i}`),r.set(e,{scrollOffset:t.scrollOffset+t.size,size:a})}}let a=r.get(i);return zp(a!==void 0,`Unexpected bounds cache miss for index ${i}`),a},set(e,t){r.set(e,t)},get size(){return r.size}}}function Wp({itemCount:e,itemProps:t,itemSize:n}){return B(()=>Up({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function Gp({containerSize:e,itemSize:t}){let n;switch(typeof t){case`string`:zp(t.endsWith(`%`),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),zp(e!==void 0,`Container size must be defined if a percentage item size is specified`),n=e*parseInt(t)/100;break;default:n=t;break}return n}function Kp({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:i=!1,itemCount:a,itemProps:o,itemSize:s,onResize:c,overscanCount:l}){let[u,d]=V([0,-1]),[f,p]=[Math.min(a-1,u[0]),Math.min(a-1,u[1])],{height:m=n,width:h=n}=Pp({defaultHeight:r===`vertical`?n:void 0,defaultWidth:r===`horizontal`?n:void 0,element:e,mode:r===`vertical`?`only-height`:`only-width`,style:t}),g=z({height:0,width:0}),_=r===`vertical`?m:h,v=Gp({containerSize:_,itemSize:s});se(()=>{if(typeof c==`function`){let e=g.current;(e.height!==m||e.width!==h)&&(c({height:m,width:h},{...e}),e.height=m,e.width=h)}},[m,c,h]);let y=Wp({itemCount:a,itemProps:o,itemSize:v}),b=L(e=>y.get(e),[y]),x=L(()=>Bp({cachedBounds:y,itemCount:a,itemSize:v}),[y,a,v]),S=L(t=>{let n=Rp({containerElement:e,direction:r,isRtl:i,scrollOffset:t});return Hp({cachedBounds:y,containerScrollOffset:n,containerSize:_,itemCount:a,overscanCount:l})},[y,e,_,r,i,a,l]);return Mp(()=>{let t=(r===`vertical`?e?.scrollTop:e?.scrollLeft)??0;d(S(t))},[e,r,S]),Mp(()=>{if(!e)return;let t=()=>{d(t=>{let{scrollLeft:n,scrollTop:o}=e,s=Rp({containerElement:e,direction:r,isRtl:i,scrollOffset:r===`vertical`?o:n}),c=Hp({cachedBounds:y,containerScrollOffset:s,containerSize:_,itemCount:a,overscanCount:l});return c[0]===t[0]&&c[1]===t[1]?t:c})};return e.addEventListener(`scroll`,t),()=>{e.removeEventListener(`scroll`,t)}},[y,e,_,r,a,l]),{getCellBounds:b,getEstimatedSize:x,scrollToIndex:Fp(({align:t=`auto`,behavior:n=`auto`,containerScrollOffset:o,index:s})=>{let c=Vp({align:t,cachedBounds:y,containerScrollOffset:o,containerSize:_,index:s,itemCount:a,itemSize:v});if(e)if(c=Rp({containerElement:e,direction:r,isRtl:i,scrollOffset:c}),typeof e.scrollTo==`function`)r===`horizontal`?e.scrollTo({left:c,behavior:n||void 0}):e.scrollTo({behavior:n||void 0,top:c});else{let e=S(c);(e[0]!==f||e[1]!==p)&&d(e)}}),startIndex:f,stopIndex:p}}function qp(e){return B(()=>e,Object.values(e))}function Jp(e,t){if(e===t)return!0;if(!!e!=!!t||(zp(e!==void 0),zp(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(let n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function Yp(e,t){let{style:n,...r}=e,{style:i,...a}=t;return Jp(n,i)&&Jp(r,a)}function Xp({cellComponent:e,cellProps:t,className:n,columnCount:r,columnWidth:i,defaultHeight:a=0,defaultWidth:o=0,dir:s,gridRef:c,onCellsRendered:l,onResize:u,overscanCount:d=3,rowCount:f,rowHeight:p,style:m,...h}){let g=qp(t),_=B(()=>fe(e,Yp),[e]),[v,y]=V(null),b=jp(v,s),{getCellBounds:x,getEstimatedSize:S,startIndex:C,scrollToIndex:w,stopIndex:T}=Kp({containerElement:v,defaultContainerSize:o,direction:`horizontal`,isRtl:b,itemCount:r,itemProps:g,itemSize:i,onResize:u,overscanCount:d}),{getCellBounds:E,getEstimatedSize:D,startIndex:O,scrollToIndex:k,stopIndex:A}=Kp({containerElement:v,defaultContainerSize:a,direction:`vertical`,itemCount:f,itemProps:g,itemSize:p,onResize:u,overscanCount:d});ve(c,()=>({get element(){return v},scrollToCell({behavior:e=`auto`,columnAlign:t=`auto`,columnIndex:n,rowAlign:r=`auto`,rowIndex:i}){k({align:r,behavior:e,containerScrollOffset:v?.scrollTop??0,index:i}),w({align:t,behavior:e,containerScrollOffset:v?.scrollLeft??0,index:n})},scrollToColumn({align:e=`auto`,behavior:t=`auto`,index:n}){w({align:e,behavior:t,containerScrollOffset:v?.scrollLeft??0,index:n})},scrollToRow({align:e=`auto`,behavior:t=`auto`,index:n}){k({align:e,behavior:t,containerScrollOffset:v?.scrollTop??0,index:n})}}),[v,w,k]),H(()=>{C>=0&&T>=0&&O>=0&&A>=0&&l&&l({columnStartIndex:C,columnStopIndex:T,rowStartIndex:O,rowStopIndex:A})},[l,C,T,O,A]);let j=B(()=>{let e=[];if(r>0&&f>0)for(let t=O;t<=A;t++){let n=E(t);for(let r=C;r<=T;r++){let i=x(r);e.push(ie(_,{...g,columnIndex:r,key:`${t}-${r}`,rowIndex:t,style:{position:`absolute`,left:b?void 0:0,right:b?0:void 0,transform:`translate(${b?-i.scrollOffset:i.scrollOffset}px, ${n.scrollOffset}px)`,height:f>1?n.size:`100%`,width:i.size}}))}}return e},[_,g,r,C,T,x,E,b,f,O,A]);return M(`div`,{...h,className:n,dir:s,ref:y,style:{width:`100%`,height:`100%`,...m,maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`},children:M(`div`,{className:n,style:{position:`relative`,height:D(),width:S()},children:j})})}var Zp=z;I();var Qp=new Map,$p=3e4,em=e=>{let t=Qp.get(e);if(t)return t;let n=new Promise(t=>{let n=new Image;n.onload=()=>t(!0),n.onerror=()=>{setTimeout(()=>Qp.delete(e),$p),t(!1)},n.src=e});return Qp.set(e,n),n},tm=e=>{let t=(e??[]).map(e=>e?.url).filter(e=>!!e),n=t.join(`|`),[r,i]=V(t[0]);return H(()=>{let e=!1;return i(t[0]),(async()=>{for(let n of t){let t=await em(n);if(e)return;if(t){i(n);return}}})(),()=>{e=!0}},[n]),r},nm=l`
795
- &.card, .card {
796
- position: relative;
797
- display: flex;
798
- flex-direction: column;
799
- justify-content: flex-end;
800
- font-size: 2.5rem;
801
- overflow: hidden;
802
- border-radius: 1rem;
803
-
804
- height: 35rem;
805
- width: 25rem;
806
-
807
- &.link {
808
- position: absolute;
809
- inset: 0;
810
- }
811
-
812
- .information {
813
- width: 100%;
814
- text-shadow: rgb(0 0 0 / 80%) 1px 1px 0;
815
- background:
816
- linear-gradient(
817
- 0deg,
818
- rgba(0,0,0,0.5) 0%,
819
- rgba(0,0,0,0.5) calc(100% - 1rem),
820
- rgba(0,0,0,0) 100%
821
- );
822
-
823
- display: flex;
824
- flex-direction: column;
825
- justify-content: center;
826
- align-items: center;
827
- text-align: center;
828
- padding: 1rem 2rem 0rem 2rem;
829
- color: white;
830
- font-size: 2.5rem;
831
- overflow: hidden;
832
- pointer-events: none;
833
- max-height: 10rem;
834
-
835
- .title {
836
- width: 100%;
837
- max-height: 10rem;
838
-
839
- font-size: 2.2rem;
840
- font-weight: bold;
841
- margin: .5rem 0;
842
- }
843
-
844
- .title-text {
845
- color: white;
846
- position: relative;
847
- }
848
- }
849
-
850
- &.full-title .information,
851
- &.full-title .information .title {
852
- max-height: none;
853
- }
854
- }
855
-
856
- /* On mobile the search grid wants fluid cards (it sets no inline size); the home
857
- carousel pins each cell with an inline width+height from react-window, which wins
858
- over these, so it's unaffected. */
859
- @media (max-width: 768px) {
860
- &.card {
861
- width: 100%;
862
- height: auto;
863
- aspect-ratio: 5 / 7;
864
- }
865
- }
866
- `,rm=({media:e,to:t,ellipsis:n=!0,...r})=>{let i=e.titles?.at(0)?.title,a=tm(e.covers);return g(`div`,{...r,css:nm,className:`card category-item${n?``:` full-title`}`,style:{...typeof r.style==`object`?r.style:void 0,backgroundImage:`url(${a})`,backgroundSize:`cover`},children:[j(J,{tabIndex:-1,to:t,className:`card link`}),j(`div`,{className:`information`,children:j(`div`,{className:`title`,children:j(J,{to:t,className:`title-text`,children:n?j(Cp,{children:i}):i})})})]})};R();var im=l`
867
- cursor: grab;
868
- &:active {
869
- cursor: grabbing;
870
- }
871
- &.active * {
872
- pointer-events: none;
873
- }
874
- `,am=({children:e,isDragging:t,setIsDragging:n})=>{if(`ontouchstart`in document.documentElement)return j(C,{children:e});let[r,i]=V(null),[a,o]=V(!1),[s,c]=V(),l=z({startX:0,startY:0,scrollLeft:0,scrollTop:0}),u=B(()=>globalThis,[]),d=L(e=>{if(!(e.target instanceof HTMLElement)||e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight||!r||!r.contains(e.target))return;e.preventDefault();let t=r.children.item(0);if(t){let n=e.pageX-t.offsetLeft,r=e.pageY-t.offsetTop,i=t.scrollLeft,a=t.scrollTop;l.current={startX:n,startY:r,scrollLeft:i,scrollTop:a}}o(!0)},[o,n,c,r]),f=L(e=>{o(!1),n(!1),u.removeEventListener(`mousemove`,p),s&&clearTimeout(s),c(globalThis.setTimeout(()=>n(!1),50))},[o,n,c,s,r]),p=L(e=>{if(!a||!r)return;e.preventDefault();let t=r.children.item(0);if(t){let n=e.pageX-t.offsetLeft,r=e.pageY-t.offsetTop,i=n-l.current.startX,a=r-l.current.startY;t.scrollLeft=l.current.scrollLeft-i,t.scrollTop=l.current.scrollTop-a}n(!0)},[a,r]);return H(()=>{if(r)return u.addEventListener(`mousedown`,d),u.addEventListener(`mouseup`,f),u.addEventListener(`mousemove`,p),()=>{u.removeEventListener(`mousedown`,d),u.removeEventListener(`mouseup`,f),u.removeEventListener(`mousemove`,p)}},[r,a,n,s,d,f,p]),j(`div`,{ref:e=>i(e),className:`draggable ${t?`active`:``}`,css:im,children:e})};I();var om=l`
875
- display: grid;
876
- background-color: rgb(35, 35, 35);
877
- border-radius: 1rem;
878
- user-select: none;
879
-
880
- width: 70rem;
881
-
882
- a {
883
- color: #fff;
884
- text-decoration: none;
885
- }
886
-
887
- .content {
888
- padding: 2rem;
889
- width: 70rem;
890
-
891
- .title {
892
- margin-bottom: .5rem;
893
- font-size: 2rem;
894
- font-weight: 600;
895
- }
896
-
897
- .top {
898
- display: flex;
899
- justify-content: space-between;
900
- align-items: center;
901
- margin-bottom: 1rem;
902
- font-size: 1.5rem;
903
- font-weight: 600;
904
- }
905
-
906
- .description {
907
- overflow: hidden;
908
- text-overflow: ellipsis;
909
- font-size: 1.25rem;
910
- font-weight: 500;
911
- max-height: 5rem;
912
- }
913
- }
914
-
915
- .title-hovercard-player {
916
- position: relative;
917
- display: grid;
918
- grid-template: "container";
919
- background-color: #000;
920
- overflow: hidden;
921
- border-top-left-radius: 1rem;
922
- border-top-right-radius: 1rem;
923
- user-select: none;
924
- overflow: hidden;
925
- height: 39.25rem;
926
- width: 70rem;
927
-
928
- & youtube-video {
929
- grid-area: container;
930
- pointer-events: none;
931
- margin-top: -10.3rem;
932
- height: 60rem !important;
933
- width: 70rem !important;
934
- }
935
- }
936
-
937
- .trailer-fallback-cover {
938
- position: relative;
939
- display: grid;
940
- grid-template: "container";
941
- background-color: #000;
942
- overflow: hidden;
943
- border-top-left-radius: 1rem;
944
- border-top-right-radius: 1rem;
945
- user-select: none;
946
- overflow: hidden;
947
- height: 39.25rem;
948
- width: 70rem;
949
- background-size: cover;
950
- background-position: center;
951
- }
952
- `,sm=({ref:e,media:t,...n})=>{let r=B(()=>t?.titles?.at(0)?.title,[t]),i=B(()=>t?.shortDescriptions?.at(0)?.shortDescription,[t]),a=tm(t?.covers),[o,s]=V([]),c=B(()=>t?.trailers.filter(e=>!o.includes(e.uri)).at(0),[o]),l=L(()=>{c&&s([...o,c.uri])},[c,o]);return g(`div`,{ref:e,className:`title-hovercard`,css:om,...n,children:[c?.url?j(vp,{volume:0,url:c?.url,onError:l,redirectTo:X(Y.MEDIA,{uri:t.uri}),className:`title-hovercard-player`}):a?j(J,{className:`trailer-fallback-cover`,style:{backgroundImage:`url(${a})`},to:X(Y.MEDIA,{uri:t.uri})}):void 0,j(J,{to:X(Y.MEDIA,{uri:t.uri}),children:g(`div`,{className:`content`,children:[j(`div`,{className:`title`,children:r}),j(`div`,{className:`top`,children:g(`span`,{className:`episodes`,children:[t.episodeCount??`?`,` Episodes`]})}),j(Cp,{className:`description`,children:i})]})})]})};R();var cm=l`
953
- display: flex;
954
- flex-direction: column;
955
- position: relative;
956
- --card-gutter: 100px;
957
- & > .title {
958
- position: relative;
959
- /* The section is a flex COLUMN, which blockifies this <a> and stretches it across the viewport,
960
- so the heading's box (and its hover and focus ring) ran the full width of the screen for a few
961
- words of text. Cross-axis start keeps the box the size of the words in it. */
962
- align-self: flex-start;
963
- margin-left: 10rem;
964
- font-size: 4rem;
965
- font-weight: bold;
966
- color: rgb(255, 255, 255);
967
- text-shadow: rgba(0, 0, 0, 0.8) -1px -1px 0px, rgba(0, 0, 0, 0.8) -1px 1px 0px, rgba(0, 0, 0, 0.8) 1px -1px 0px, rgba(0, 0, 0, 0.8) 1px 1px 0px;
968
- padding-bottom: 0.5rem;
969
- user-select: none;
970
- }
971
- & > .list-container {
972
- position: relative;
973
- & > .scroll-button {
974
- position: absolute;
975
- top: 50%;
976
- transform: translateY(-50%);
977
- width: 60px;
978
- height: 60px;
979
- background: rgba(0, 0, 0, 0.7);
980
- border: none;
981
- border-radius: 2.5rem;
982
- color: white;
983
- font-size: 24px;
984
- cursor: pointer;
985
- display: flex;
986
- align-items: center;
987
- justify-content: center;
988
- transition: background 0.2s ease;
989
- &:hover {
990
- background: rgba(0, 0, 0, 0.9);
991
- }
992
- &.left {
993
- left: 20px;
994
- }
995
- &.right {
996
- right: 20px;
997
- }
998
- }
999
-
1000
- & > div > .virtual-list {
1001
- display: grid;
1002
- grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
1003
- grid-gap: 1rem;
1004
- padding-bottom: 0.5rem;
1005
- scrollbar-width: thin;
1006
- scrollbar-color: rgb(134, 132, 141) rgb(15, 15, 15);
1007
- }
1008
- }
1009
-
1010
- @media (max-width: 768px) {
1011
- --card-gutter: 1.5rem;
1012
-
1013
- & > .title {
1014
- margin-left: 1.5rem;
1015
- font-size: 2.4rem;
1016
- }
1017
-
1018
- & > .list-container > .scroll-button {
1019
- display: none;
1020
- }
1021
- }
1022
- `,lm=({style:e,mediaNodes:t,columnIndex:n})=>{let r=t[n];if(!r)return null;let[i,a]=V(!1),{x:o,y:s,strategy:c,refs:l,context:u}=bd({open:i,onOpenChange:a,whileElementsMounted:_,placement:`top`,middleware:[Ql(({rects:e})=>-e.reference.height/2-e.floating.height/2),$l({crossAxis:!0,padding:25})]}),d=Du(u,{restMs:400,handleClose:Nd()}),{styles:f}=kd(u,{initial:{opacity:0,transform:`scale(0.8)`},open:{opacity:1,transform:`scale(1)`},duration:150}),{getReferenceProps:p,getFloatingProps:m}=Sd([d]);return g(C,{children:[i&&j(Ju,{children:j(sm,{media:r,ref:l.setFloating,style:{...f,position:c,top:s??0,left:o??0,zIndex:zd.hoverCard},...m()})}),j(rm,{media:r,to:X(Y.MEDIA,{uri:r.uri}),style:{...e,width:250,marginLeft:`var(--card-gutter, 100px)`},onMouseEnter:e=>{e.target instanceof HTMLElement&&l.setReference(e.target)},...p()},r._id)]})},um=({title:e,titleTo:t,mediaNodes:n})=>{let[r,i]=V(0),[a,o]=V(0),[s,c]=V(!1),l=Zp(null),u=L(e=>{let t=l.current;t&&t.scrollToColumn({index:e===`left`?r<=0?0:r:a+1>=n.length?n.length-1:a,behavior:`smooth`})},[r,a,n.length,l]);return g(`div`,{css:cm,children:[t?j(J,{to:t,className:`title`,children:e}):j(`span`,{className:`title`,children:e}),g(`div`,{className:`list-container`,children:[j(am,{isDragging:s,setIsDragging:c,children:j(Xp,{gridRef:l,className:`virtual-list`,cellComponent:lm,cellProps:{mediaNodes:n},columnCount:n.length,columnWidth:260,rowCount:1,rowHeight:350,overscanCount:5,onCellsRendered:({columnStartIndex:e,columnStopIndex:t})=>{i(e),o(t)}})}),j(`button`,{className:`scroll-button left`,onClick:()=>u(`left`),children:j(tc,{})}),j(`button`,{className:`scroll-button right`,onClick:()=>u(`right`),children:j(nc,{})})]})]})};I();var dm=l`
1023
- position: relative;
1024
- overflow: hidden;
1025
- transition: max-height 0.3s ease-in-out;
1026
-
1027
- & > .content {
1028
- padding-bottom: 5rem;
1029
- }
1030
-
1031
- &.collapsed {
1032
- position: relative;
1033
- }
1034
-
1035
- .fade-overlay {
1036
- position: absolute;
1037
- bottom: 2.5rem;
1038
- left: 0;
1039
- right: 0;
1040
- height: 10rem;
1041
- background: linear-gradient(to bottom, transparent, rgba(35, 35, 35, 1));
1042
- pointer-events: none;
1043
- transition: opacity 0.3s ease-in-out;
1044
- }
1045
-
1046
- .toggle-button {
1047
- font-size: 2.5rem;
1048
- position: absolute;
1049
- bottom: 0;
1050
- left: 50%;
1051
- transform: translateX(-50%);
1052
- padding: 1rem;
1053
- border: none;
1054
- font-weight: 500;
1055
- cursor: pointer;
1056
- width: 100%;
1057
- background-color: rgb(35, 35, 35);
1058
- }
1059
- `,fm=({children:e,collapsedHeight:t=200,...n})=>{let[r,i]=V(!1),[a,o]=V(!1),s=z(null),[c,l]=V(0);H(()=>{if(!s.current)return;let e=new ResizeObserver(()=>{if(s.current){let e=s.current.scrollHeight;l(e),o(e>t)}});return e.observe(s.current),()=>e.disconnect()},[t]);let u=()=>i(!r);return g(`div`,{...n,ref:s,css:dm,className:`${n.className||``} ${!r&&a?`collapsed`:`expanded`}`,children:[j(`div`,{className:`content`,children:e}),a&&!r?j(`div`,{className:`fade-overlay`}):void 0,a?j(`button`,{className:`toggle-button`,onClick:u,children:r?`Collapse`:`Expand`}):void 0]})},pm={PREQUEL:`SEQUEL`,ADAPTATION:`SOURCE`,COMPILATION:`CONTAINS`,SIDE_STORY:`PARENT`},mm=e=>{let t=new Set,n=[];for(let r of e){if(!r?.from||!r?.to||r.from===r.to)continue;let e=pm[r.relation],i=e?{from:r.to,to:r.from,relation:e}:r,a=`${i.from}${i.to}${i.relation}`;t.has(a)||(t.add(a),n.push(i))}return n},hm=new Set([`TV`,`TV_SHORT`,`MOVIE`,`SPECIAL`,`OVA`,`ONA`,`MUSIC`]),gm=e=>!e||hm.has(e),_m=e=>[...new Set((e.nodes??[]).map(e=>e.format??``).filter(Boolean))].sort(),vm=(e,t)=>{let n=(e.nodes??[]).filter(t),r=new Set(n.map(e=>e.uri));return{nodes:n,edges:(e.edges??[]).filter(e=>r.has(e.from)&&r.has(e.to))}},ym=e=>`${e.from}\u0000${e.to}\u0000${e.relation}`,bm=(e,t)=>{if(!e)return{nodes:new Set,edges:new Set};if(e.kind===`node`){let n=t.filter(t=>t.from===e.uri||t.to===e.uri);return{nodes:new Set([e.uri]),edges:new Set(n.map(ym))}}let n=t.find(t=>ym(t)===e.key);return n?{nodes:new Set([n.from,n.to]),edges:new Set([e.key])}:{nodes:new Set,edges:new Set}},xm=e=>e.titles?.[0]?.title||e.uri,Sm=e=>[...e].sort((e,t)=>(e.startDate??`9999`).localeCompare(t.startDate??`9999`)||xm(e).localeCompare(xm(t))),Cm=(e,t)=>{let n=new Map(e.map(e=>[e.uri,0]));for(let r=0;r<e.length;r++){let e=!1;for(let r of t){let t=n.get(r.from),i=n.get(r.to);t===void 0||i===void 0||i<t+1&&(n.set(r.to,t+1),e=!0)}if(!e)break}let r=[...new Set(n.values())].sort((e,t)=>e-t),i=new Map(r.map((e,t)=>[e,t]));for(let[e,t]of n)n.set(e,i.get(t)??0);return n},wm=(e,t=`story`)=>{let n=mm(e.edges??[]),r=new Set((e.nodes??[]).map(e=>e.uri)),i=n.filter(e=>r.has(e.from)&&r.has(e.to)),a=Sm(e.nodes??[]),o=t===`graph`?Cm(a,i):void 0,s=[...new Set(a.map(e=>e.startDate??``))],c=new Map(s.map((e,t)=>[e,t])),l=new Map,u=a.map(e=>{let t=o?o.get(e.uri)??0:c.get(e.startDate??``)??0,n=l.get(t)??0;return l.set(t,n+1),{...e,column:t,row:n}}),d=[];if(t===`story`)for(let e=0;e<u.length-1;e++){let t=u[e],n=u[e+1];n.column>t.column&&d.push({from:t.uri,to:n.uri})}return{nodes:u,edges:i,chain:d,columns:Math.max(0,...u.map(e=>e.column+1)),rows:Math.max(0,...l.values())}},Tm={ADAPTATION:`Adaptation`,PREQUEL:`Prequel`,SEQUEL:`Sequel`,PARENT:`Parent story`,SIDE_STORY:`Side story`,CHARACTER:`Character`,SUMMARY:`Summary`,ALTERNATIVE:`Alternative`,SPIN_OFF:`Spin off`,SOURCE:`Source`,COMPILATION:`Compilation`,CONTAINS:`Contains`,OTHER:`Related`},Em=[`SOURCE`,`PREQUEL`,`SEQUEL`,`PARENT`,`SIDE_STORY`,`SPIN_OFF`,`ALTERNATIVE`,`ADAPTATION`,`SUMMARY`,`COMPILATION`,`CONTAINS`,`CHARACTER`,`OTHER`],Dm=e=>{let t=Em.indexOf(e);return t===-1?Em.length:t},Om=e=>e&&Tm[e]||Tm.OTHER,km={TV:`TV`,TV_SHORT:`TV Short`,MOVIE:`Movie`,SPECIAL:`Special`,OVA:`OVA`,ONA:`ONA`,MUSIC:`Music`,MANGA:`Manga`,NOVEL:`Light Novel`,ONE_SHOT:`One Shot`},Am=e=>e?km[e]||e.split(`_`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):void 0,jm=e=>[...e].sort((e,t)=>Dm(e.relation)-Dm(t.relation)),Mm=e=>e.filter(e=>gm(e.format)),Nm=e=>{let t=jm(e);return{before:t.filter(e=>e.relation===`PREQUEL`),middle:t.filter(e=>e.relation!==`PREQUEL`&&e.relation!==`SEQUEL`),after:t.filter(e=>e.relation===`SEQUEL`)}},Pm=l`
1060
- margin-top: 4rem;
1061
-
1062
- & > .heading {
1063
- display: flex;
1064
- align-items: center;
1065
- /* the graph button sits beside the word, not across the modal, so the two read as one control */
1066
- gap: 1.5rem;
1067
- font-size: 1.8rem;
1068
- font-weight: 600;
1069
- color: rgba(255, 255, 255, 0.9);
1070
- margin-bottom: 1.5rem;
1071
- }
1072
-
1073
- & > .grid {
1074
- display: flex;
1075
- flex-wrap: wrap;
1076
- gap: 1.2rem;
1077
- align-items: stretch;
1078
- }
1079
-
1080
- /* The two outer lanes take an EQUAL share of the free space, which is what centres the middle one
1081
- on the modal rather than on whatever is left over beside a sequel. An empty lane still takes its
1082
- share, so a row with no prequel keeps its side story centred instead of sliding left. */
1083
- & > .grid > .lane {
1084
- display: flex;
1085
- flex-wrap: wrap;
1086
- gap: 1.2rem;
1087
- }
1088
-
1089
- & > .grid > .before { flex: 1 1 0; justify-content: flex-start; }
1090
- & > .grid > .middle { flex: 0 1 auto; justify-content: center; }
1091
- & > .grid > .after { flex: 1 1 0; justify-content: flex-end; }
1092
-
1093
- /* Below this the lanes cannot sit side by side, so they wrap onto their own lines and the timeline
1094
- stops being readable as one: a lone sequel pushed to the right edge of its own line is just a
1095
- card in a strange place. Measured at a 500px viewport, where the row is 458px and three 28rem
1096
- cards cannot share it. Stack them and let them read top to bottom instead. */
1097
- @media (max-width: 768px) {
1098
- & > .grid > .lane { flex: 1 1 100%; justify-content: flex-start; }
1099
- }
1100
- `,Fm=l`
1101
- /* A card sized itself off the grid track until the lanes replaced it, so it needs its own basis
1102
- now. 28rem is the track's old minimum, and shrinking is left on so a narrow modal wraps rather
1103
- than overflows. */
1104
- flex: 0 1 28rem;
1105
- display: flex;
1106
- align-items: stretch;
1107
- gap: 1.2rem;
1108
- padding: 0;
1109
- border-radius: 0.6rem;
1110
- background: rgba(255, 255, 255, 0.05);
1111
- overflow: hidden;
1112
- color: inherit;
1113
- text-decoration: none;
1114
- transition: background 0.15s ease;
1115
-
1116
- &:hover {
1117
- background: rgba(255, 255, 255, 0.1);
1118
- }
1119
-
1120
- & > .cover {
1121
- flex-shrink: 0;
1122
- width: 6rem;
1123
- /* the aspect every cover in this app is, so a missing image leaves a hole the right shape */
1124
- aspect-ratio: 2 / 3;
1125
- object-fit: cover;
1126
- background-color: rgb(35, 35, 35);
1127
- pointer-events: none;
1128
- }
1129
-
1130
- & > .body {
1131
- display: flex;
1132
- flex-direction: column;
1133
- justify-content: center;
1134
- gap: 0.4rem;
1135
- padding: 1rem 1.2rem 1rem 0;
1136
- min-width: 0;
1137
- }
1138
-
1139
- & .relation {
1140
- font-size: 1.3rem;
1141
- font-weight: 700;
1142
- /* the one accented thing on the card: it is what the reader is scanning for */
1143
- color: rgb(61, 180, 242);
1144
- }
1145
-
1146
- & .title {
1147
- font-size: 1.5rem;
1148
- font-weight: 600;
1149
- color: rgba(255, 255, 255, 0.95);
1150
- /* two lines then ellipsis: a light novel title runs long and a ragged card height is worse */
1151
- display: -webkit-box;
1152
- -webkit-line-clamp: 2;
1153
- -webkit-box-orient: vertical;
1154
- overflow: hidden;
1155
- }
1156
-
1157
- & .meta {
1158
- font-size: 1.25rem;
1159
- color: rgba(255, 255, 255, 0.55);
1160
- }
1161
- `,Im=({edge:e})=>{let t=tm(e.node.covers),n=e.node.titles?.at(0)?.title,r=[Am(e.format),gs(e.node.status)].filter(Boolean).join(` · `);return g(J,{className:`relation-card`,css:Fm,to:X(Y.MEDIA,{uri:T(e.node.uri)}),children:[t?j(`img`,{className:`cover`,src:t,alt:``}):j(`div`,{className:`cover`}),g(`div`,{className:`body`,children:[j(`div`,{className:`relation`,children:Om(e.relation)}),j(`div`,{className:`title`,children:n??e.node.uri}),r?j(`div`,{className:`meta`,children:r}):void 0]})]})},Lm=({relations:e,action:t})=>{let n=Mm(e);if(!n.length)return null;let r=Nm(n);return g(`div`,{css:Pm,"data-relations":!0,children:[g(`div`,{className:`heading`,children:[j(`span`,{children:`Relations`}),t]}),j(`div`,{className:`grid`,children:[`before`,`middle`,`after`].map(e=>j(`div`,{className:`lane ${e}`,children:r[e].map(e=>j(Im,{edge:e},`${e.relation}:${e.node.uri}`))},e))})]})},Rm={x:0,y:0,k:1},zm=.05,Bm=e=>Math.min(20,Math.max(zm,Number.isFinite(e)?e:1)),Vm=(e,t,n)=>({...e,x:e.x+t,y:e.y+n}),Hm=(e,t,n)=>({x:(t-e.x)/e.k,y:(n-e.y)/e.k}),Um=(e,t,n,r)=>{let i=Bm(e.k*(Number.isFinite(r)&&r>0?r:1));if(i===e.k)return e;let a=Hm(e,t,n);return{k:i,x:t-a.x*i,y:n-a.y*i}},Wm=(e,t,n=32)=>{let r=Math.max(1,t.width-n*2),i=Math.max(1,t.height-n*2);if(e.width<=0||e.height<=0)return Rm;let a=Bm(Math.min(1,r/e.width,i/e.height));return{k:a,x:(t.width-e.width*a)/2,y:(t.height-e.height*a)/2}};I();var Gm=190,Km=74,qm=90,Jm=24,Ym=40,Xm=280,Zm=98,Qm=l`
1162
- display: inline-flex;
1163
- align-items: center;
1164
- gap: 0.6rem;
1165
- padding: 0.5rem 1.1rem;
1166
- border: 1px solid rgba(255, 255, 255, 0.18);
1167
- border-radius: 0.5rem;
1168
- background: transparent;
1169
- color: rgba(255, 255, 255, 0.75);
1170
- font-family: inherit;
1171
- font-size: 1.3rem;
1172
- font-weight: 600;
1173
- cursor: pointer;
1174
- transition: all 0.15s ease;
1175
-
1176
- &:hover {
1177
- color: #fff;
1178
- border-color: rgba(255, 255, 255, 0.4);
1179
- background: rgba(255, 255, 255, 0.06);
1180
- }
1181
-
1182
- svg { width: 1.5rem; height: 1.5rem; }
1183
- `,$m=l`
1184
- display: flex;
1185
- align-items: center;
1186
- justify-content: center;
1187
- padding: 4rem;
1188
- background: rgba(0, 0, 0, 0.75);
1189
- z-index: ${zd.franchiseDialog};
1190
-
1191
- .sheet {
1192
- position: relative;
1193
- display: flex;
1194
- flex-direction: column;
1195
- width: 100%;
1196
- height: 100%;
1197
- max-width: 170rem;
1198
- background: rgb(18, 18, 20);
1199
- border: 1px solid rgba(255, 255, 255, 0.1);
1200
- border-radius: 0.8rem;
1201
- overflow: hidden;
1202
- }
1203
-
1204
- .bar {
1205
- display: flex;
1206
- align-items: center;
1207
- gap: 2rem;
1208
- /* right padding clears the close button, which is positioned rather than in the flow */
1209
- padding: 1.5rem 7rem 1.5rem 2rem;
1210
- border-bottom: 1px solid rgba(255, 255, 255, 0.08);
1211
-
1212
- & > .title {
1213
- font-size: 1.8rem;
1214
- font-weight: 700;
1215
- color: #fff;
1216
- flex-shrink: 0;
1217
- }
1218
-
1219
- }
1220
-
1221
- .close {
1222
- position: absolute;
1223
- top: 1.4rem;
1224
- right: 2rem;
1225
- display: flex;
1226
- align-items: center;
1227
- justify-content: center;
1228
- width: 3.4rem;
1229
- height: 3.4rem;
1230
- border: 1px solid rgba(255, 255, 255, 0.15);
1231
- border-radius: 50%;
1232
- background: transparent;
1233
- color: rgba(255, 255, 255, 0.7);
1234
- cursor: pointer;
1235
-
1236
- &:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
1237
- svg { width: 1.7rem; height: 1.7rem; }
1238
- }
1239
-
1240
- /* Over the canvas rather than up in the bar, so the control sits with the thing it controls. It is
1241
- the one part of the surface that is NOT draggable, hence the pointer handlers it stops. */
1242
- .kinds {
1243
- position: absolute;
1244
- top: 1.2rem;
1245
- left: 1.2rem;
1246
- z-index: 1;
1247
- display: flex;
1248
- flex-direction: column;
1249
- gap: 0.2rem;
1250
- padding: 0.9rem 1.1rem;
1251
- border: 1px solid rgba(255, 255, 255, 0.1);
1252
- border-radius: 0.6rem;
1253
- background: rgba(18, 18, 20, 0.9);
1254
- backdrop-filter: blur(6px);
1255
- cursor: default;
1256
-
1257
- & > .legend {
1258
- font-size: 1.1rem;
1259
- font-weight: 700;
1260
- letter-spacing: 0.06em;
1261
- text-transform: uppercase;
1262
- color: rgba(255, 255, 255, 0.4);
1263
- margin-bottom: 0.4rem;
1264
- }
1265
-
1266
- & > label {
1267
- display: flex;
1268
- align-items: center;
1269
- gap: 0.7rem;
1270
- font-size: 1.3rem;
1271
- font-weight: 600;
1272
- color: rgba(255, 255, 255, 0.55);
1273
- cursor: pointer;
1274
- white-space: nowrap;
1275
-
1276
- &.on { color: #fff; }
1277
-
1278
- input {
1279
- width: 1.4rem;
1280
- height: 1.4rem;
1281
- margin: 0;
1282
- accent-color: rgb(61, 180, 242);
1283
- cursor: pointer;
1284
- }
1285
- }
1286
- }
1287
-
1288
- .canvas {
1289
- flex: 1;
1290
- /* HIDDEN, not auto. The drawing is moved by a transform rather than by a scroll offset, so there
1291
- is nothing here to scroll and no content bounds to be stopped by: the surface is unbounded in
1292
- every direction and at every zoom. */
1293
- overflow: hidden;
1294
- position: relative;
1295
- touch-action: none;
1296
- /* dragged rather than scrolled, so the pointer says so before it is pressed */
1297
- cursor: grab;
1298
- background-color: rgb(9, 9, 10);
1299
- /* the paper the graph is drawn on: one faint dot every 24px, which gives the panning something to
1300
- move against. The local attachment is load bearing: the default pins the grid to the viewport,
1301
- and the graph would then appear to slide over a field that never moves */
1302
- background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.14) 1px, transparent 0);
1303
- background-size: 24px 24px;
1304
- background-attachment: local;
1305
-
1306
- &.dragging { cursor: grabbing; }
1307
- }
1308
-
1309
- /* a relationship a source stated */
1310
- .edge {
1311
- fill: none;
1312
- stroke: rgba(255, 255, 255, 0.22);
1313
- stroke-width: 1.5;
1314
- stroke-dasharray: 4 3;
1315
- }
1316
-
1317
- /* the reading order, derived from the dates: solid, brighter, and never labelled */
1318
- .chain {
1319
- fill: none;
1320
- stroke: rgba(61, 180, 242, 0.55);
1321
- stroke-width: 2;
1322
- }
1323
-
1324
- .edge-label {
1325
- fill: rgba(255, 255, 255, 0.5);
1326
- font-size: 10px;
1327
- font-weight: 700;
1328
- letter-spacing: 0.04em;
1329
- text-anchor: middle;
1330
- }
1331
-
1332
- .node rect {
1333
- fill: rgb(28, 28, 30);
1334
- stroke: rgba(255, 255, 255, 0.14);
1335
- rx: 6;
1336
- }
1337
-
1338
- .node:hover rect { fill: rgb(42, 42, 46); stroke: rgba(255, 255, 255, 0.35); }
1339
- .node.current rect { stroke: rgb(61, 180, 242); stroke-width: 2; }
1340
-
1341
- .node .title { fill: rgba(255, 255, 255, 0.95); font-size: 12px; font-weight: 700; text-anchor: middle; }
1342
- .node .meta { fill: rgba(255, 255, 255, 0.5); font-size: 10px; text-anchor: middle; }
1343
-
1344
- /* One colour for "what the pointer is talking about", amber so it never reads as the blue that
1345
- means "the work you came from". Both hovering a work and hovering an arrow use it, which is what
1346
- makes the two gestures feel like the same question asked from either end. */
1347
- .node.lit rect { stroke: rgb(255, 176, 62); stroke-width: 2; fill: rgb(52, 42, 26); }
1348
- .node.lit .title { fill: #fff; }
1349
- .edge.lit { stroke: rgb(255, 176, 62); stroke-width: 2.5; stroke-dasharray: none; }
1350
- .chain.lit { stroke: rgb(255, 176, 62); stroke-width: 3; }
1351
- .edge-label.lit { fill: rgb(255, 176, 62); }
1352
-
1353
- /* the text alone is a thin target, so each label carries an invisible pad it can be caught by */
1354
- .label-hit { fill: transparent; cursor: pointer; }
1355
- `,eh=24,th=e=>{let t=e.split(/\s+/).filter(Boolean),n=[],r=``;for(let e of t){let t=r?`${r} ${e}`:e;if(t.length<=eh){r=t;continue}if(n.length===1)break;r&&n.push(r),r=e}r&&n.length<2&&n.push(r);let i=n.slice(0,2);return i.join(` `).length<e.length&&i.length&&(i[i.length-1]=`${i[i.length-1].slice(0,eh-1)}…`),i.length?i:[e.slice(0,eh)]},nh=4,rh=({franchise:e,currentUris:t})=>{let n=B(()=>_m(e),[e]),[r,i]=V(()=>new Set(n.filter(gm))),a=[...r].every(gm)?`story`:`graph`,o=B(()=>wm(vm(e,e=>!e.format||r.has(e.format)),a),[e,r,a]),s=new Set(t),c=z(null),l=z(void 0),[u,d]=V(!1),[f,p]=V(Rm),m=z(!1),h=Math.max(1,o.columns)*Xm-qm+Ym*2,_=Math.max(1,o.rows)*Zm-Jm+Ym*2,v=new Map(o.nodes.map(e=>[e.uri,e])),y=e=>{let t=v.get(e);if(t)return{x:Ym+t.column*Xm+Gm/2,y:Ym+t.row*Zm+Km/2}};se(()=>{let e=c.current;e&&p(Wm({width:h,height:_},{width:e.clientWidth,height:e.clientHeight}))},[h,_]),H(()=>{let e=c.current;if(!e)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect(),r=Math.exp(-Math.sign(t.deltaY)*.18);p(e=>Um(e,t.clientX-n.left,t.clientY-n.top,r))};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]);let[b,x]=V(void 0),S=B(()=>bm(b,o.edges),[b,o.edges]),w=e=>b?.kind===`node`&&(e.from===b.uri||e.to===b.uri),E=e=>i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return g(C,{children:[j(`div`,{className:`bar`,children:j(`div`,{className:`title`,children:`Series`})}),g(`div`,{className:`canvas${u?` dragging`:``}`,ref:c,"data-canvas":!0,style:{backgroundPosition:`${f.x}px ${f.y}px`,backgroundSize:`${24*f.k}px ${24*f.k}px`},onPointerDown:e=>{!c.current||e.button!==0||(l.current={x:e.clientX,y:e.clientY,view:f,id:e.pointerId},m.current=!1,d(!0))},onPointerMove:e=>{let t=l.current;if(!t)return;let n=e.clientX-t.x,r=e.clientY-t.y;!m.current&&(Math.abs(n)>nh||Math.abs(r)>nh)&&(m.current=!0,c.current?.setPointerCapture?.(e.pointerId)),p(Vm(t.view,n,r))},onPointerUp:e=>{c.current?.releasePointerCapture?.(e.pointerId),l.current=void 0,d(!1)},onPointerCancel:()=>{l.current=void 0,d(!1)},onPointerLeave:()=>x(void 0),onClickCapture:e=>{m.current&&=(e.preventDefault(),e.stopPropagation(),!1)},children:[n.length?g(`div`,{className:`kinds`,onPointerDown:e=>e.stopPropagation(),children:[j(`div`,{className:`legend`,children:`Show`}),n.map(e=>g(`label`,{className:r.has(e)?`on`:void 0,children:[j(`input`,{type:`checkbox`,checked:r.has(e),onChange:()=>E(e)}),j(`span`,{children:Am(e)})]},e))]}):void 0,j(`svg`,{width:`100%`,height:`100%`,role:`img`,"aria-label":`Every work in this series, in order`,children:g(`g`,{transform:`translate(${f.x} ${f.y}) scale(${f.k})`,children:[o.chain.map(e=>{let t=y(e.from),n=y(e.to);if(!t||!n)return null;let r=t.x+Gm/2,i=n.x-Gm/2,a=Math.max(20,(i-r)/2);return j(`path`,{className:`chain${w(e)?` lit`:``}`,d:`M ${r} ${t.y} C ${r+a} ${t.y}, ${i-a} ${n.y}, ${i} ${n.y}`},`chain-${e.from}-${e.to}`)}),o.edges.map(e=>{let t=y(e.from),n=y(e.to);if(!t||!n)return null;let r=n.x>=t.x,i=t.x+(r?Gm/2:-190/2),a=n.x+(r?-190/2:Gm/2),o=Math.max(20,Math.abs(a-i)/2)*(r?1:-1),s=(e,t)=>e+(t-e)*.34,c=ym(e),l=S.edges.has(c)?` lit`:``,u=Om(e.relation).toUpperCase(),d=s(i,a),f=s(t.y,n.y)-6,p=u.length*6.4+12;return g(`g`,{children:[j(`path`,{className:`edge${l}`,d:`M ${i} ${t.y} C ${i+o} ${t.y}, ${a-o} ${n.y}, ${a} ${n.y}`}),g(`g`,{className:`label`,onPointerEnter:()=>x({kind:`edge`,key:c}),onPointerLeave:()=>x(void 0),children:[j(`rect`,{className:`label-hit`,x:d-p/2,y:f-11,width:p,height:15}),j(`text`,{className:`edge-label${l}`,x:d,y:f,children:u})]})]},c)}),o.nodes.map(e=>{let t=y(e.uri),n=xm(e),r=th(n),i=[Am(e.format),e.episodeCount?`${e.episodeCount} ep`:void 0].filter(Boolean).join(` · `),a=t.x-Gm/2,o=t.y-Km/2;return j(J,{className:`node${s.has(e.uri)?` current`:``}${S.nodes.has(e.uri)?` lit`:``}`,to:X(Y.MEDIA,{uri:T(e.uri)}),children:g(`g`,{onPointerEnter:()=>x({kind:`node`,uri:e.uri}),onPointerLeave:()=>x(void 0),children:[j(`rect`,{x:a,y:o,width:Gm,height:Km}),r.map((e,n)=>j(`text`,{className:`title`,x:t.x,y:o+(r.length===1?32:26)+n*15,children:e},e+n)),i?j(`text`,{className:`meta`,x:t.x,y:o+Km-14,children:i}):void 0,j(`title`,{children:n})]})},e.uri)})]})})]})]})},ih=({franchise:e,currentUris:t})=>{let[n,r]=V(!1),{refs:i,context:a}=bd({open:n,onOpenChange:r}),{getReferenceProps:o,getFloatingProps:s}=Sd([md(a),vd(a,{outsidePress:!0}),wd(a,{role:`dialog`})]);return!e||(e.nodes?.length??0)<2?null:g(C,{children:[g(`button`,{type:`button`,css:Qm,ref:i.setReference,...o(),"data-franchise-open":!0,children:[j(fc,{}),`See detailed relation graph`]}),n?j(Ju,{children:j(ud,{lockScroll:!0,css:$m,"data-franchise":!0,children:j(ad,{context:a,children:g(`div`,{className:`sheet`,ref:i.setFloating,...s(),children:[j(rh,{franchise:e,currentUris:t}),j(`button`,{type:`button`,className:`close`,"aria-label":`Close`,onClick:()=>r(!1),children:j(Ec,{})})]})})})}):void 0]})},ah=(e,t)=>e?.find(e=>!t.has(e.url))?.url,oh=/^\d{4}-\d{2}-\d{2}$/,sh=1900,ch=e=>{if(!e)return;let t=new Date(e);if(!Number.isNaN(t.getTime())&&!(t.getUTCFullYear()<sh))return t},lh=(e,{locale:t}={})=>{let n=ch(e);if(n)try{return new Intl.DateTimeFormat(t,{year:`numeric`,month:`short`,day:`numeric`,...oh.test(e)?{timeZone:`UTC`}:{}}).format(n)}catch{return}},uh=(e,t)=>t?Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()):Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),dh=864e5,fh=(e,{locale:t,now:n=new Date}={})=>{let r=ch(e);if(!r)return;let i=Math.round((uh(n,!1)-uh(r,oh.test(e)))/dh);return i===0?`today`:i===1?`yesterday`:i>1&&i<30?`${i} days ago`:lh(e,{locale:t})},ph=e=>{let t=ch(e);if(t)return oh.test(e)?e:t.toISOString()};I();var mh=l`
1356
- position: fixed;
1357
- inset: 0;
1358
- z-index: ${zd.sourcePopup};
1359
- display: flex;
1360
- align-items: center;
1361
- justify-content: center;
1362
- padding: 4vh 4vw;
1363
- background: rgba(0, 0, 0, 0.65);
1364
- backdrop-filter: blur(3px);
1365
-
1366
- .wrap {
1367
- display: flex;
1368
- flex-direction: column;
1369
- gap: 0.8rem;
1370
- width: 100%;
1371
- max-width: 120rem;
1372
- height: 100%;
1373
- max-height: 72rem;
1374
- }
1375
-
1376
- /* the package frame sits above every stub element (the fkn overlay pins itself to the top of the
1377
- stacking order), so the close button lives OUTSIDE the slot rather than over it */
1378
- .bar {
1379
- display: flex;
1380
- align-items: center;
1381
- gap: 1rem;
1382
- color: rgba(255, 255, 255, 0.75);
1383
- font-size: 1.3rem;
1384
- }
1385
-
1386
- .bar .spacer { margin-left: auto; }
1387
-
1388
- .close {
1389
- padding: 0.4rem 1.1rem;
1390
- border: 1px solid rgba(255, 255, 255, 0.25);
1391
- border-radius: 0.4rem;
1392
- background: rgba(0, 0, 0, 0.4);
1393
- color: #fff;
1394
- font: inherit;
1395
- font-size: 1.3rem;
1396
- cursor: pointer;
1397
- }
1398
-
1399
- .close:hover { background: rgba(255, 255, 255, 0.14); }
1400
-
1401
- /* The slot IS the panel, not a child of one. fkn reads the placeholder's own computed
1402
- border-radius and clips the package frame to it, so a radius on a wrapper would leave the frame
1403
- painting square corners over a rounded box. */
1404
- .slot,
1405
- .fallback {
1406
- flex: 1;
1407
- min-height: 0;
1408
- border-radius: 0.8rem;
1409
- background: #101010;
1410
- border: 1px solid rgba(255, 255, 255, 0.1);
1411
- overflow: hidden;
1412
- }
1413
-
1414
- .fallback {
1415
- display: flex;
1416
- align-items: center;
1417
- justify-content: center;
1418
- padding: 2rem;
1419
- text-align: center;
1420
- color: rgba(255, 255, 255, 0.55);
1421
- font-size: 1.4rem;
1422
- }
1423
- `,hh=({pluginUri:e,origin:t,name:n,uris:r,onPick:i,onClose:a})=>{let o=z(null),[s,c]=V(``);return H(()=>{let n=o.current;if(!n)return;let s=!1,l;return(async()=>{try{l=await x.show(e,{element:n})}catch(e){c(e instanceof Error?e.message:String(e));return}let o=await Xn(t,r);s||(o?i(o):a())})(),()=>{s=!0,l?.hide(),x.hide(e,{element:n}).catch(()=>{})}},[e,t,r.join(`,`)]),H(()=>{let e=e=>{e.key===`Escape`&&a()};return addEventListener(`keydown`,e),()=>removeEventListener(`keydown`,e)},[a]),j(`div`,{css:mh,role:`dialog`,"aria-modal":`true`,"aria-label":`Choose a source from ${n}`,onClick:a,children:g(`div`,{className:`wrap`,onClick:e=>e.stopPropagation(),children:[g(`div`,{className:`bar`,children:[j(`span`,{children:n}),j(`span`,{className:`spacer`}),j(`button`,{type:`button`,className:`close`,onClick:a,children:`Close`})]}),s?g(`div`,{className:`fallback`,children:[`This source could not open its picker. `,s]}):j(`div`,{className:`slot`,ref:o})]})})};I();var gh={cr:`#f47521`,nf:`#e50914`,jw:`#fcd53f`,disney:`#0063e5`,amazon:`#00a8e1`,appletv:`#e8e8ed`,hulu:`#1ce783`,hbo:`#7b5cff`,peacock:`#069de0`,paramount:`#0064ff`,fubo:`#fa4616`},_h=`#9aa0a6`,vh=e=>e.color||gh[e.id]||_h,yh=l`
1424
- display: flex;
1425
- flex-direction: column;
1426
- gap: 1.1rem;
1427
-
1428
- .label {
1429
- font-size: 1.2rem;
1430
- font-weight: 600;
1431
- letter-spacing: 0.08em;
1432
- text-transform: uppercase;
1433
- color: rgba(255, 255, 255, 0.4);
1434
- }
1435
-
1436
- .list {
1437
- display: flex;
1438
- flex-wrap: wrap;
1439
- gap: 1rem;
1440
- }
1441
-
1442
- .source {
1443
- --brand: ${_h};
1444
- position: relative;
1445
- display: flex;
1446
- align-items: center;
1447
- gap: 1.1rem;
1448
- min-width: 17rem;
1449
- padding: 0.9rem 1.4rem 0.9rem 1.1rem;
1450
- background: rgb(28, 28, 30);
1451
- border: 1px solid rgba(255, 255, 255, 0.08);
1452
- border-radius: 1rem;
1453
- color: #fff;
1454
- text-decoration: none;
1455
- cursor: pointer;
1456
- overflow: hidden;
1457
- transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
1458
-
1459
- &::before {
1460
- content: '';
1461
- position: absolute;
1462
- left: 0;
1463
- top: 0;
1464
- bottom: 0;
1465
- width: 3px;
1466
- background: var(--brand);
1467
- opacity: 0.45;
1468
- transition: opacity 0.15s ease, width 0.15s ease;
1469
- }
1470
-
1471
- &:hover {
1472
- transform: translateY(-2px);
1473
- background: rgb(34, 34, 37);
1474
- border-color: color-mix(in srgb, var(--brand) 55%, transparent);
1475
-
1476
- &::before {
1477
- opacity: 1;
1478
- }
1479
-
1480
- .play {
1481
- opacity: 0.9;
1482
- }
1483
- }
1484
-
1485
- &.active {
1486
- border-color: var(--brand);
1487
- background:
1488
- linear-gradient(
1489
- 90deg,
1490
- color-mix(in srgb, var(--brand) 24%, transparent),
1491
- color-mix(in srgb, var(--brand) 7%, transparent)
1492
- );
1493
-
1494
- &::before {
1495
- width: 4px;
1496
- opacity: 1;
1497
- }
1498
- }
1499
-
1500
- .icon {
1501
- display: flex;
1502
- align-items: center;
1503
- justify-content: center;
1504
- flex-shrink: 0;
1505
- width: 3.2rem;
1506
- height: 3.2rem;
1507
- border-radius: 0.7rem;
1508
- background: color-mix(in srgb, var(--brand) 16%, rgba(255, 255, 255, 0.04));
1509
- color: var(--brand);
1510
- font-size: 1.6rem;
1511
- font-weight: 700;
1512
- text-transform: uppercase;
1513
- overflow: hidden;
1514
-
1515
- img {
1516
- width: 100%;
1517
- height: 100%;
1518
- object-fit: contain;
1519
- padding: 0.45rem;
1520
- box-sizing: border-box;
1521
- }
1522
- }
1523
-
1524
- .name {
1525
- flex: 1;
1526
- font-size: 1.45rem;
1527
- font-weight: 600;
1528
- white-space: nowrap;
1529
- }
1530
-
1531
- .play,
1532
- .ext,
1533
- .playing {
1534
- flex-shrink: 0;
1535
- }
1536
-
1537
- .play {
1538
- font-size: 1rem;
1539
- color: var(--brand);
1540
- opacity: 0;
1541
- transition: opacity 0.15s ease;
1542
- }
1543
-
1544
- .ext {
1545
- font-size: 1.4rem;
1546
- color: rgba(255, 255, 255, 0.45);
1547
- }
1548
-
1549
- .playing {
1550
- display: flex;
1551
- align-items: flex-end;
1552
- gap: 2px;
1553
- height: 1.4rem;
1554
-
1555
- i {
1556
- width: 3px;
1557
- background: var(--brand);
1558
- border-radius: 1px;
1559
- transform-origin: bottom;
1560
- animation: source-eq 0.9s ease-in-out infinite;
1561
- }
1562
-
1563
- i:nth-of-type(1) {
1564
- height: 45%;
1565
- animation-delay: 0s;
1566
- }
1567
-
1568
- i:nth-of-type(2) {
1569
- height: 100%;
1570
- animation-delay: 0.2s;
1571
- }
1572
-
1573
- i:nth-of-type(3) {
1574
- height: 70%;
1575
- animation-delay: 0.4s;
1576
- }
1577
- }
1578
- }
1579
-
1580
- .source-group {
1581
- display: flex;
1582
- flex-direction: column;
1583
- gap: 0.6rem;
1584
-
1585
- .source {
1586
- width: 100%;
1587
- font: inherit;
1588
- text-align: left;
1589
- }
1590
-
1591
- .count {
1592
- flex-shrink: 0;
1593
- padding: 0.1rem 0.6rem;
1594
- border-radius: 1rem;
1595
- background: color-mix(in srgb, var(--brand) 22%, rgba(255, 255, 255, 0.06));
1596
- color: var(--brand);
1597
- font-size: 1.1rem;
1598
- font-weight: 700;
1599
- }
1600
-
1601
- .chevron {
1602
- flex-shrink: 0;
1603
- font-size: 1rem;
1604
- color: rgba(255, 255, 255, 0.45);
1605
- }
1606
- }
1607
-
1608
- .releases {
1609
- display: flex;
1610
- flex-direction: column;
1611
- gap: 0.4rem;
1612
- padding-left: 1.2rem;
1613
- border-left: 1px solid rgba(255, 255, 255, 0.08);
1614
-
1615
- .release {
1616
- display: flex;
1617
- align-items: center;
1618
- gap: 0.8rem;
1619
- padding: 0.6rem 1rem;
1620
- border-radius: 0.7rem;
1621
- background: rgba(255, 255, 255, 0.03);
1622
- color: rgba(255, 255, 255, 0.75);
1623
- font-size: 1.25rem;
1624
- text-decoration: none;
1625
- transition: background 0.12s ease, color 0.12s ease;
1626
-
1627
- &:hover {
1628
- background: rgba(255, 255, 255, 0.07);
1629
- color: #fff;
1630
-
1631
- .play {
1632
- opacity: 0.9;
1633
- }
1634
- }
1635
-
1636
- &.active {
1637
- background: color-mix(in srgb, var(--brand) 18%, transparent);
1638
- color: #fff;
1639
- }
1640
- }
1641
-
1642
- .release-label {
1643
- flex: 1;
1644
- overflow: hidden;
1645
- text-overflow: ellipsis;
1646
- white-space: nowrap;
1647
- }
1648
- }
1649
-
1650
- @keyframes source-eq {
1651
- 0%, 100% { transform: scaleY(0.35); }
1652
- 50% { transform: scaleY(1); }
1653
- }
1654
- `,bh=l`
1655
- display: flex;
1656
- align-items: center;
1657
- gap: 0.7rem;
1658
-
1659
- .src {
1660
- --brand: ${_h};
1661
- display: flex;
1662
- text-decoration: none;
1663
- border-radius: 0.6rem;
1664
- transition: transform 0.12s ease;
1665
-
1666
- &:hover {
1667
- transform: translateY(-2px);
1668
- }
1669
-
1670
- .icon {
1671
- display: flex;
1672
- align-items: center;
1673
- justify-content: center;
1674
- width: 2.8rem;
1675
- height: 2.8rem;
1676
- border-radius: 0.6rem;
1677
- border: 1px solid transparent;
1678
- background: color-mix(in srgb, var(--brand) 18%, rgba(255, 255, 255, 0.05));
1679
- color: var(--brand);
1680
- font-size: 1.3rem;
1681
- font-weight: 700;
1682
- text-transform: uppercase;
1683
- overflow: hidden;
1684
- transition: border-color 0.12s ease, background 0.12s ease;
1685
-
1686
- img {
1687
- width: 100%;
1688
- height: 100%;
1689
- object-fit: contain;
1690
- padding: 0.4rem;
1691
- box-sizing: border-box;
1692
- }
1693
- }
1694
-
1695
- &:hover .icon {
1696
- border-color: var(--brand);
1697
- background: color-mix(in srgb, var(--brand) 30%, rgba(255, 255, 255, 0.05));
1698
- }
1699
- }
1700
- `,xh=({source:e})=>{let[t,n]=V(!1);return j(`span`,{className:`icon`,children:e.icon&&!t?j(`img`,{src:e.icon,alt:``,onError:()=>n(!0)}):e.name.charAt(0)})},Sh=({sources:e,compact:t=!1,onPickRelease:n})=>{let[r,i]=V(null);return e.length?t?j(`div`,{css:bh,children:e.map(e=>j(`a`,{className:`src`,style:{"--brand":vh(e)},href:e.href,target:e.external?`_blank`:void 0,rel:e.external?`noreferrer`:void 0,title:`Watch on ${e.name}`,children:j(xh,{source:e})},e.id))}):g(`div`,{css:yh,children:[j(`div`,{className:`label`,children:`Watch on`}),j(`div`,{className:`list`,children:e.map(e=>e.releases&&e.releases.length>1?j(Ch,{source:e,onOpenPicker:()=>i(e)},e.id):g(`a`,{className:`source${e.active?` active`:``}`,style:{"--brand":vh(e)},href:e.href,target:e.external?`_blank`:void 0,rel:e.external?`noreferrer`:void 0,title:e.name,children:[j(xh,{source:e}),j(`span`,{className:`name`,children:e.name}),e.active?g(`span`,{className:`playing`,children:[j(`i`,{}),j(`i`,{}),j(`i`,{})]}):e.external?j(`span`,{className:`ext`,children:`↗`}):j(`span`,{className:`play`,children:`▶`})]},e.id))}),r?.picker?j(hh,{pluginUri:r.picker.pluginUri,origin:r.id,name:r.name,uris:(r.releases??[]).map(e=>e.uri),onPick:e=>{i(null),n?.(e)},onClose:()=>i(null)}):void 0]}):null},Ch=({source:e,onOpenPicker:t})=>{let n=e.releases??[],[r,i]=V(n.some(e=>e.active)),a=!!e.picker;return g(`div`,{className:`source-group`,style:{"--brand":vh(e)},children:[g(`button`,{type:`button`,className:`source${e.active?` active`:``}`,style:{"--brand":vh(e)},onClick:()=>a?t():i(e=>!e),title:`${n.length} releases on ${e.name}`,"aria-expanded":a?void 0:r,"aria-haspopup":a?`dialog`:void 0,children:[j(xh,{source:e}),j(`span`,{className:`name`,children:e.name}),j(`span`,{className:`count`,children:n.length}),j(`span`,{className:`chevron`,children:a?`›`:r?`▾`:`▸`})]}),!a&&r?j(`div`,{className:`releases`,children:n.map(e=>g(`a`,{className:`release${e.active?` active`:``}`,href:e.href,target:e.external?`_blank`:void 0,rel:e.external?`noreferrer`:void 0,title:e.label,children:[j(`span`,{className:`release-label`,children:e.label}),e.active?g(`span`,{className:`playing`,children:[j(`i`,{}),j(`i`,{}),j(`i`,{})]}):e.external?j(`span`,{className:`ext`,children:`↗`}):j(`span`,{className:`play`,children:`▶`})]},e.uri))}):void 0]})},wh=e=>[...new Set((e?.handles??[]).filter(e=>e.relation===`SAME_AS`).map(e=>e.node.origin))];I();var Th=l`
1701
- z-index: ${zd.mediaModal};
1702
- padding: 5rem 1rem;
1703
- background-color: hsla(0, 0%, 0%, 0.439);
1704
- animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
1705
-
1706
- @media (min-width: 1024px) {
1707
- padding: 5rem 1rem;
1708
- }
1709
- @media (min-width: 1440px) {
1710
- padding: 5rem 4rem;
1711
- }
1712
-
1713
- .modal {
1714
- position: relative;
1715
- display: flex;
1716
- flex-direction: column;
1717
- width: 100%;
1718
- max-width: 80rem;
1719
- background-color: rgb(35, 35, 35);
1720
- border-radius: 1rem;
1721
- box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
1722
- overflow: hidden;
1723
- margin: auto;
1724
-
1725
- @media (min-width: 1024px) {
1726
- max-width: 100rem;
1727
- }
1728
- @media (min-width: 1440px) {
1729
- max-width: 130rem;
1730
- }
1731
- @media (min-width: 2560px) {
1732
- max-width: 180rem;
1733
- }
1734
-
1735
-
1736
- .trailer {
1737
- --yt-top-margin: -24.5rem;
1738
- --yt-height: 150.25rem;
1739
- --trailer-height: 101rem;
1740
- position: relative;
1741
- overflow: hidden;
1742
- height: var(--trailer-height);
1743
- background-size: cover;
1744
- background-position: center;
1745
- .player {
1746
- border-radius: 1rem 1rem 0 0;
1747
- overflow: hidden;
1748
- height: var(--trailer-height);
1749
- user-select: none;
1750
-
1751
- youtube-video {
1752
- grid-area: container;
1753
- pointer-events: none;
1754
- margin-top: var(--yt-top-margin) !important;
1755
- height: var(--yt-height) !important;
1756
- }
1757
- }
1758
- .player-controls {
1759
- position: absolute;
1760
- bottom: 0rem;
1761
- padding: 2.5rem;
1762
- display: flex;
1763
- align-items: center;
1764
- gap: 1rem;
1765
-
1766
- & > span {
1767
- position: relative;
1768
- width: 3rem;
1769
- height: 3rem;
1770
- cursor: pointer;
1771
-
1772
- .icon-body {
1773
- position: absolute;
1774
- top: 50%;
1775
- left: 50%;
1776
- transform: translate(-50%, -50%);
1777
- }
1778
- .icon-outline {
1779
- position: absolute;
1780
- top: 50%;
1781
- left: 50%;
1782
- transform: translate(-50%, -50%);
1783
- }
1784
- }
1785
- }
1786
- }
1787
-
1788
- & > .content {
1789
- padding: 2.5rem;
1790
- & > .header {
1791
- display: flex;
1792
- gap: 1rem;
1793
-
1794
- & > .title {
1795
- font-size: 3rem;
1796
- font-weight: 600;
1797
- cursor: default;
1798
- }
1799
-
1800
- & > .origins {
1801
- display: flex;
1802
- gap: 1rem;
1803
- align-items: center;
1804
-
1805
- & > .origin {
1806
- height: 4rem;
1807
- & > img {
1808
- height: 4rem;
1809
- width: 4rem;
1810
- }
1811
- }
1812
- }
1813
- }
1814
-
1815
- & > .description {
1816
- white-space: pre-wrap;
1817
- margin-top: 2.5rem;
1818
- cursor: default;
1819
-
1820
- &.collapsed {
1821
- max-height: 20rem;
1822
- }
1823
- }
1824
-
1825
- .episodes {
1826
- margin-top: 4rem;
1827
- border-top: 0.1rem solid rgba(255, 255, 255, 0.1);
1828
- .episode {
1829
- position: relative;
1830
- display: flex;
1831
- border-bottom: 0.1rem solid rgba(255, 255, 255, 0.1);
1832
- color: rgb(255, 255, 255);
1833
- text-decoration: none;
1834
- overflow: hidden;
1835
- height: 10rem;
1836
-
1837
- & > .episode-link {
1838
- position: absolute;
1839
- inset: 0;
1840
- z-index: 0;
1841
- color: inherit;
1842
- text-decoration: none;
1843
- }
1844
-
1845
- &:hover {
1846
- background-color: rgba(255, 255, 255, 0.05);
1847
- }
1848
-
1849
- .number {
1850
- display: flex;
1851
- align-items: center;
1852
- justify-content: center;
1853
- font-size: 2rem;
1854
- font-weight: bold;
1855
- min-width: 7.5rem;
1856
- }
1857
-
1858
- .thumbnail {
1859
- flex-shrink: 0;
1860
- margin: auto 0;
1861
- height: 7.5rem;
1862
- aspect-ratio: 16 / 9;
1863
- object-fit: cover;
1864
- background-color: rgb(35, 35, 35);
1865
- border-radius: .5rem;
1866
- margin-right: 2.5rem;
1867
- /* decorative only, let the row link under it take hovers and clicks */
1868
- pointer-events: none;
1869
- }
1870
-
1871
- .content {
1872
- display: flex;
1873
- flex-direction: column;
1874
- /*align-items: center;*/
1875
- justify-content: center;
1876
-
1877
- & > .header {
1878
- display: flex;
1879
-
1880
- & > .title {
1881
- font-size: 2rem;
1882
- font-weight: bold;
1883
- }
1884
- & > .origins {
1885
- position: relative;
1886
- z-index: 1;
1887
- display: flex;
1888
- align-items: center;
1889
- margin-left: 1rem;
1890
- }
1891
- }
1892
-
1893
- & > .description {
1894
- margin-top: 0.5rem;
1895
- max-height: 6rem;
1896
- overflow: hidden;
1897
-
1898
- * > .ellipsis {
1899
- max-height: 6rem;
1900
- white-space: pre-wrap;
1901
- overflow: hidden;
1902
- }
1903
- }
1904
- }
1905
-
1906
- .side {
1907
- /* auto rather than a grown .content: the row's other children keep the widths they had, and
1908
- the date sits against the right edge however long the title and description turn out */
1909
- margin-left: auto;
1910
- display: flex;
1911
- align-items: center;
1912
- flex-shrink: 0;
1913
- padding: 0 2.5rem 0 2rem;
1914
- /* decorative, like the thumbnail above it: the whole row is one link */
1915
- pointer-events: none;
1916
-
1917
- & > .date {
1918
- font-size: 1.5rem;
1919
- font-weight: 600;
1920
- color: rgba(255, 255, 255, 0.8);
1921
- white-space: nowrap;
1922
- text-align: right;
1923
- }
1924
- }
1925
- }
1926
- }
1927
- }
1928
- }
1929
-
1930
- @media (max-width: 768px) {
1931
- padding: 4rem 0.6rem;
1932
-
1933
- .modal {
1934
- .trailer {
1935
- /* The desktop crop is fixed-rem, tuned for an 80rem modal; on a full-width
1936
- mobile modal retune it in vw so the same crop ratio tracks the width. */
1937
- --trailer-height: 64vw;
1938
- --yt-height: 95vw;
1939
- --yt-top-margin: -15.5vw;
1940
-
1941
- .player-controls {
1942
- padding: 1.5rem;
1943
- }
1944
- }
1945
-
1946
- & > .content {
1947
- padding: 1.5rem;
1948
-
1949
- & > .header > .title {
1950
- font-size: 2.2rem;
1951
- }
1952
-
1953
- & > .header > .origins > .origin {
1954
- height: 3rem;
1955
- & > img {
1956
- height: 3rem;
1957
- width: 3rem;
1958
- }
1959
- }
1960
-
1961
- & > .description {
1962
- margin-top: 1.5rem;
1963
- font-size: 1.4rem;
1964
- }
1965
-
1966
- .episodes {
1967
- margin-top: 2.5rem;
1968
-
1969
- .episode {
1970
- height: auto;
1971
- min-height: 7rem;
1972
- padding: 0.8rem 0;
1973
-
1974
- .number {
1975
- min-width: 3.5rem;
1976
- font-size: 1.6rem;
1977
- }
1978
-
1979
- .thumbnail {
1980
- height: 5rem;
1981
- margin-right: 1rem;
1982
- }
1983
-
1984
- .content {
1985
- & > .header > .title {
1986
- font-size: 1.5rem;
1987
- }
1988
- & > .description {
1989
- font-size: 1.3rem;
1990
- max-height: 4.5rem;
1991
- }
1992
- }
1993
- }
1994
- }
1995
- }
1996
- }
1997
- }
1998
- `,Eh=Gf(`
1999
- subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {
2000
- media(input: $input) {
2001
- ...MediaFragment
2002
- titles {
2003
- language
2004
- title
2005
- score
2006
- }
2007
- descriptions(input: $descriptionInput) {
2008
- language
2009
- description
2010
- }
2011
- covers {
2012
- language
2013
- url
2014
- }
2015
- banners {
2016
- language
2017
- url
2018
- }
2019
- trailers {
2020
- uri
2021
- origin
2022
- id
2023
- url
2024
- thumbnail
2025
- }
2026
- popularity
2027
- categories
2028
- franchise {
2029
- nodes {
2030
- uri
2031
- format
2032
- status
2033
- episodeCount
2034
- startDate
2035
- titles {
2036
- title
2037
- }
2038
- }
2039
- edges {
2040
- from
2041
- to
2042
- relation
2043
- }
2044
- }
2045
- relations {
2046
- relation
2047
- format
2048
- node {
2049
- _id
2050
- uri
2051
- origin
2052
- id
2053
- url
2054
- status
2055
- episodeCount
2056
- startDate
2057
- titles {
2058
- title
2059
- }
2060
- covers {
2061
- url
2062
- color
2063
- }
2064
- }
2065
- }
2066
- episodes {
2067
- ...EpisodeFragment
2068
- episodeNumber
2069
- releaseDate
2070
- titles {
2071
- title
2072
- }
2073
- shortDescriptions {
2074
- language
2075
- shortDescription
2076
- }
2077
- thumbnails {
2078
- url
2079
- }
2080
- handles {
2081
- relation
2082
- node {
2083
- ...EpisodeFragment
2084
- episodeNumber
2085
- releaseDate
2086
- titles {
2087
- title
2088
- }
2089
- shortDescriptions {
2090
- language
2091
- shortDescription
2092
- }
2093
- thumbnails {
2094
- url
2095
- }
2096
- }
2097
- }
2098
- }
2099
- handles {
2100
- relation
2101
- node {
2102
- ...MediaFragment
2103
- handles {
2104
- relation
2105
- node {
2106
- ...MediaFragment
2107
- episodes {
2108
- ...EpisodeFragment
2109
- }
2110
- }
2111
- }
2112
- episodes {
2113
- ...EpisodeFragment
2114
- }
2115
- }
2116
- }
2117
- episodeCount
2118
- }
2119
- }
2120
- `),Dh=Gf(`
2121
- subscription GetMediaModalOrigins($input: OriginPageInput!) {
2122
- originPage(input: $input) {
2123
- nodes {
2124
- ...OriginFragment
2125
- }
2126
- }
2127
- }
2128
- `),Oh=({episode:e,index:t,mediaUri:n,isMovie:r})=>{let[i,a]=V(()=>new Set),o=ah(e.thumbnails,i),s=e.releaseDate??e.handles?.find(e=>e.node.releaseDate)?.node.releaseDate,c=fh(s),l=wh(e),[{data:u}]=kn({query:Dh,variables:{input:{ids:l,filters:[Po.IsNotApiOnly]}},pause:!l}),d=(u?.originPage?.nodes??[]).map(t=>{let r=(e?.handles??[]).filter(e=>e.relation===`SAME_AS`&&e.node.origin===t.id).map(e=>e.node),i=r.at(0),a=i?.uri,o=!!(A(t.id)&&i?.url),s=e.uri?r.length>1?X(Y.WATCH,{mediaUri:n,episodeUri:e.uri}):a?X(Y.WATCH,{mediaUri:n,episodeUri:e.uri,sourceUri:a}):void 0:void 0,c=r.length>1;return{id:t.id,name:t.name??t.id,icon:t.icon,color:t.color,href:c||o?s:i?.url??void 0,external:c?!1:!o,active:!1}}).filter(e=>e.href).sort((e,t)=>Number(e.external)-Number(t.external)).slice(0,5);return g(`div`,{className:`episode`,children:[e.uri?j(J,{className:`episode-link`,href:X(Y.WATCH,{mediaUri:n,episodeUri:e.uri})}):void 0,r?void 0:j(`div`,{className:`number`,children:e.episodeNumber}),o?j(`img`,{className:`thumbnail`,src:o,onError:()=>a(e=>new Set(e).add(o))}):j(`div`,{className:`thumbnail`}),r?j(`div`,{className:`content`,children:g(`div`,{className:`header`,children:[j(`div`,{className:`title`,children:`Play`}),j(`span`,{className:`origins`,children:j(Sh,{compact:!0,sources:d})})]})}):e.titles?.length?g(`div`,{className:`content`,children:[g(`div`,{className:`header`,children:[j(`div`,{className:`title`,children:e.titles.at(0)?.title}),j(`span`,{className:`origins`,children:j(Sh,{compact:!0,sources:d})})]}),e.shortDescriptions?.at(0)?j(`div`,{className:`description`,children:j(Cp,{className:`ellipsis`,children:e.shortDescriptions?.at(0)?.shortDescription})}):void 0]}):j(`div`,{className:`content`,children:j(`div`,{className:`header`,children:g(`div`,{className:`title`,children:[`Episode `,t+1]})})}),j(`div`,{className:`side`,children:c?j(`time`,{className:`date`,dateTime:ph(s),children:c}):void 0})]})},kh=({mediaNodes:e})=>{let t=fo(),n={...t,uri:O(t.uri)},[,r]=mo(),i=e.find(e=>k(e.uri,n.uri)),[a,o]=V(n.uri);H(()=>{o(e=>e&&E(e)&&E(n.uri)&&k(e,n.uri)?e:n.uri)},[n.uri]);let[{data:s}]=kn({query:Eh,variables:{input:{uri:a},descriptionInput:{type:ko.Html}},pause:!a}),c=s?.media??i,l=s?.media?.uri?b(s.media.uri)?.handleUrisValues:void 0,u=[...new Set([...l?.map(e=>e.origin)??[],...c?.handles?.map(e=>e.node.origin)??[]])],[{data:d}]=kn({query:Dh,variables:{input:{ids:u,filters:[Po.IsNotApiOnly]}},pause:!u}),f=B(()=>c?.titles?.at(0)?.title,[c]),p=B(()=>c&&`descriptions`in c&&c.descriptions.sort((e,t)=>t.description.length-e.description.length)?.at(0)?.description,[c]),m=tm(c?.covers),[_,v]=V([]),[y,x]=V(),S=B(()=>{let e=(c?.trailers??[]).filter(e=>!_.includes(e.uri));return e.find(e=>e.uri===y)??e.at(0)},[c?.trailers,_,y]);H(()=>{S?.uri&&S.uri!==y&&x(S.uri)},[S?.uri,y]);let C=L(()=>{S&&v([..._,S.uri])},[S,_]),[w,T]=V(!!n),{refs:D,context:A}=bd({open:w,onOpenChange:(e,t)=>{t?.target===D.reference.current&&T(!1)}}),{getReferenceProps:M,getFloatingProps:N}=Sd([md(A)]),[P,ee]=V(!1),[te,F]=V(!0),[ne,re]=V(.25);return H(()=>{h(c?.uri,n.uri)&&r(X(Y.MEDIA,{uri:c.uri}),{replace:!0})},[c?.uri,n.uri]),w?j(Ju,{children:j(ud,{lockScroll:!0,"data-party-scroll":!0,css:Th,ref:D.setReference,...M(),children:j(ad,{context:A,children:g(`div`,{className:`modal`,ref:D.setFloating,...N(),children:[g(`div`,{className:`trailer`,style:!S?.url&&m?{backgroundImage:`url(${m})`}:{},children:[S?.url?j(vp,{url:S.url,className:`player`,onError:C,paused:P,volume:te?0:ne},S.url):void 0,g(`div`,{className:`player-controls ${S?.url?``:`hidden`}`,children:[g(`span`,{className:`playback`,children:[P?j(mc,{className:`icon-outline`,size:30,strokeWidth:3,color:`black`,onClick:()=>ee(!1)}):j(pc,{className:`icon-outline`,size:30,strokeWidth:3,color:`black`,onClick:()=>ee(!0)}),P?j(mc,{className:`icon-body`,size:30,onClick:()=>ee(!1)}):j(pc,{className:`icon-body`,size:30,onClick:()=>ee(!0)})]}),j(xp,{defaultMuted:te,onMutedUpdate:F,defaultVolume:ne,onVolumeUpdate:e=>re(e)})]})]}),g(`div`,{className:`content`,children:[g(`div`,{className:`header`,children:[j(`span`,{className:`title`,children:f}),j(`span`,{className:`origins`,children:d?.originPage?.nodes?.map(e=>{let t=c?.handles.filter(t=>t.node.origin===e.id&&t.node.url)??[],n=(t.find(e=>e.relation===`SAME_AS`)??t.at(0))?.node.url;if(e.icon)return n?j(`a`,{className:`origin`,href:n,target:`_blank`,rel:`noreferrer`,title:e.name,children:j(`img`,{src:e.icon})}):j(`div`,{className:`origin`,children:j(`img`,{src:e.icon})})}).filter(Boolean)})]}),p?j(fm,{collapsedHeight:200,className:`description`,children:j(`div`,{dangerouslySetInnerHTML:{__html:p}})}):void 0,j(Lm,{relations:c&&`relations`in c?c.relations??[]:[],action:j(ih,{franchise:c&&`franchise`in c?c.franchise:void 0,currentUris:c?.handles?.map(e=>e.node.uri)??[]})}),j(`div`,{className:`episodes`,children:c&&`episodes`in c&&c.episodes?.map((e,t)=>j(Oh,{episode:e,index:t,mediaUri:c.uri,isMovie:`categories`in c&&c.categories?.includes(Oo.Movie)},e.episodeNumber??e.uri??t))})]})]})})})}):j(wo,{to:`/`})},Ah=[{label:`All`,value:null},{label:`Anime`,value:Oo.Anime},{label:`Series`,value:Oo.Series},{label:`Movies`,value:Oo.Movie}],jh=l`
2129
- display: flex;
2130
- gap: 0.6rem;
2131
-
2132
- .tab {
2133
- padding: 0.5rem 1.3rem;
2134
- border-radius: 2rem;
2135
- border: 1px solid rgba(255, 255, 255, 0.15);
2136
- background: transparent;
2137
- color: rgba(255, 255, 255, 0.6);
2138
- font-size: 1.4rem;
2139
- cursor: pointer;
2140
- transition: all 0.15s;
2141
- }
2142
-
2143
- .tab:hover { color: rgba(255, 255, 255, 0.9); }
2144
-
2145
- .tab.active {
2146
- background: #fff;
2147
- color: #000;
2148
- border-color: #fff;
2149
- }
2150
- `,Mh=({value:e,onChange:t})=>j(`div`,{css:jh,children:Ah.map(n=>j(`button`,{className:e===n.value?`tab active`:`tab`,onClick:()=>t(n.value),children:n.label},n.label))}),Nh=e=>e._id??e.uri??``,Ph=(e,t)=>{let n=new Map(t.map((e,t)=>[e,t])),r=[],i=[];for(let t of e)(n.has(Nh(t))?r:i).push(t);return r.sort((e,t)=>n.get(Nh(e))-n.get(Nh(t))),[...r,...i]},Fh=e=>e.map(Nh).filter(Boolean),Ih=[`winter`,`spring`,`summer`,`fall`],Lh=(e=new Date)=>({season:Ih[Math.floor(e.getMonth()/3)],year:e.getFullYear()}),Rh=e=>e.toUpperCase(),zh=(e=new Date)=>{let{season:t,year:n}=Lh(e);return{season:Rh(t),year:n}};I();var Bh=Gf(`
2151
- subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {
2152
- mediaPage(input: $input) {
2153
- nodes {
2154
- ...MediaFragment
2155
- score
2156
- episodeCount
2157
- titles {
2158
- language
2159
- title
2160
- score
2161
- }
2162
- shortDescriptions(input: $shortDescriptionInput) {
2163
- language
2164
- shortDescription
2165
- }
2166
- covers {
2167
- language
2168
- url
2169
- }
2170
- banners {
2171
- language
2172
- url
2173
- }
2174
- trailers {
2175
- uri
2176
- origin
2177
- id
2178
- url
2179
- thumbnail
2180
- }
2181
- popularity
2182
- }
2183
- }
2184
- }
2185
- `),Vh=l`
2186
- .category-bar {
2187
- position: relative;
2188
- z-index: ${zd.categoryBar};
2189
- padding: 1.5rem 3rem 0.5rem;
2190
- }
2191
- `,Hh=zh(),Uh={season:ts(Hh.season),year:Hh.year},Wh=ps(Uh),Gh=()=>{let[e]=_o(Do(Y.MEDIA)),[t,n]=V(null),[{data:r}]=kn({query:Bh,variables:{input:{season:Uh.season,seasonYear:Uh.year,sorts:[jo.Popularity],...t?{categories:[t]}:{}},shortDescriptionInput:{count:1}}}),i=r?.mediaPage?.nodes,a=z([]),o=B(()=>{if(!i?.length)return i||[];let e=Ph(i,a.current);return a.current=Fh(e),e},[i]);return g(`div`,{css:Vh,children:[j(kp,{mediaNodes:o}),j(`div`,{className:`category-bar`,children:j(Mh,{value:t,onChange:n})}),j(um,{title:`Current season`,titleTo:Wh,mediaNodes:o}),e&&j(kh,{mediaNodes:o})]})},Kh=(e,t)=>{let n=e.nextAiringEpisode?.airingAt;if(!n)return;let r=new Date(n).getTime();return Number.isFinite(r)?r-t:void 0},qh=e=>e==null?void 0:`${e} episode${e===1?``:`s`}`,Jh=(e,t)=>{if(!e)return;let n=e.trim().replace(/^#/,``),r=n.length===3?n.split(``).map(e=>e+e).join(``):n.length===6?n:void 0;if(!r||!/^[0-9a-f]{6}$/i.test(r))return;let i=parseInt(r,16);return`rgba(${i>>16&255}, ${i>>8&255}, ${i&255}, ${t})`},Yh=e=>({"--accent":Jh(e,1)??`rgba(255, 255, 255, 0.75)`,"--accent-soft":Jh(e,.18)??`rgba(255, 255, 255, 0.08)`,"--accent-wash":Jh(e,.07)??`rgba(255, 255, 255, 0.03)`}),Xh=(e,t=2)=>{if(!Number.isFinite(e)||e<=0)return;let n=[],r=e;for(let e of Zh){let i=Math.floor(r/e.ms);if(r-=i*e.ms,i&&(n.push(`${i} ${i===1?e.singular:e.plural}`),n.length>=t))break}return n.length?n.join(`, `):void 0},Zh=[{ms:864e5,singular:`day`,plural:`days`},{ms:36e5,singular:`hour`,plural:`hours`},{ms:6e4,singular:`min`,plural:`mins`},{ms:1e3,singular:`sec`,plural:`secs`}];I();var Qh=3e4,$h=new Set,eg,tg=()=>{let[e,t]=V(()=>Date.now());return H(()=>($h.add(t),eg??=setInterval(()=>{let e=Date.now();for(let t of $h)t(e)},Qh),()=>{$h.delete(t),!($h.size||!eg)&&(clearInterval(eg),eg=void 0)}),[]),e},ng=e=>e>=75?`good`:e>=60?`mixed`:`poor`,rg={good:yc,mixed:uc,poor:ac},ig={good:`#4ade80`,mixed:`#fb923c`,poor:`#f87171`},ag=l`
2192
- display: inline-flex;
2193
- align-items: center;
2194
- gap: 0.6rem;
2195
- white-space: nowrap;
2196
-
2197
- .face {
2198
- display: flex;
2199
- }
2200
- `,og=({percent:e,size:t=18})=>{let n=rg[ng(e)];return g(`span`,{css:ag,"aria-label":`Rated ${e} percent`,children:[j(`span`,{className:`face`,style:{color:ig[ng(e)]},children:j(n,{size:t})}),g(`span`,{className:`value`,children:[e,`%`]})]})},sg=l`
2201
- display: grid;
2202
- grid-template-columns: 15rem minmax(0, 1fr);
2203
- height: 23rem;
2204
- border-radius: 0.8rem;
2205
- overflow: hidden;
2206
- background: rgba(255, 255, 255, 0.04);
2207
- color: rgba(255, 255, 255, 0.85);
2208
-
2209
- &:hover { color: rgba(255, 255, 255, 0.85); }
2210
- &:hover .title { color: #fff; }
2211
-
2212
- .cover {
2213
- position: relative;
2214
- background-color: #191919;
2215
- background-size: cover;
2216
- background-position: center;
2217
- display: flex;
2218
- flex-direction: column;
2219
- justify-content: flex-end;
2220
- }
2221
-
2222
- .cover-text {
2223
- padding: 1rem;
2224
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0) 100%);
2225
- text-shadow: rgb(0 0 0 / 80%) 1px 1px 0;
2226
- }
2227
-
2228
- .title {
2229
- font-size: 1.5rem;
2230
- font-weight: 600;
2231
- line-height: 1.3;
2232
- color: #fff;
2233
- display: -webkit-box;
2234
- -webkit-line-clamp: 3;
2235
- -webkit-box-orient: vertical;
2236
- overflow: hidden;
2237
- }
2238
-
2239
- .season {
2240
- margin-top: 0.4rem;
2241
- font-size: 1.3rem;
2242
- font-weight: 600;
2243
- color: var(--accent);
2244
- }
2245
-
2246
- .detail {
2247
- display: flex;
2248
- flex-direction: column;
2249
- gap: 0.8rem;
2250
- padding: 1.4rem 1.6rem;
2251
- background: var(--accent-wash);
2252
- min-width: 0;
2253
- }
2254
-
2255
- .detail-top {
2256
- display: flex;
2257
- align-items: flex-start;
2258
- justify-content: space-between;
2259
- gap: 1rem;
2260
- font-size: 1.4rem;
2261
- }
2262
-
2263
- .airing-label {
2264
- color: rgba(255, 255, 255, 0.5);
2265
- font-size: 1.3rem;
2266
- }
2267
-
2268
- .airing-value {
2269
- font-size: 1.8rem;
2270
- font-weight: 500;
2271
- color: #fff;
2272
- }
2273
-
2274
- .meta {
2275
- font-size: 1.3rem;
2276
- color: rgba(255, 255, 255, 0.5);
2277
- }
2278
-
2279
- /* NOT flex: 1. A line clamp puts the ellipsis on the clamp line but leaves the lines after it in
2280
- the box, and only a hidden overflow over a box the clamped text exactly fills keeps them out of
2281
- sight. Stretched to fill the column, the card showed three clamped lines and then two more below
2282
- the ellipsis. The chips carry the spare space instead. */
2283
- .description {
2284
- font-size: 1.3rem;
2285
- line-height: 1.5;
2286
- color: rgba(255, 255, 255, 0.6);
2287
- display: -webkit-box;
2288
- -webkit-line-clamp: 5;
2289
- -webkit-box-orient: vertical;
2290
- overflow: hidden;
2291
- }
2292
-
2293
- .chips {
2294
- display: flex;
2295
- flex-wrap: wrap;
2296
- justify-content: flex-end;
2297
- gap: 0.6rem;
2298
- margin-top: auto;
2299
- }
2300
-
2301
- .chip {
2302
- padding: 0.4rem 1rem;
2303
- border-radius: 2rem;
2304
- background: var(--accent-soft);
2305
- color: var(--accent);
2306
- font-size: 1.2rem;
2307
- font-weight: 600;
2308
- white-space: nowrap;
2309
- }
2310
-
2311
- @media (max-width: 768px) {
2312
- grid-template-columns: 11rem minmax(0, 1fr);
2313
- height: 17rem;
2314
-
2315
- .detail { padding: 1rem; gap: 0.5rem; }
2316
- .airing-value { font-size: 1.5rem; }
2317
- .description { -webkit-line-clamp: 3; }
2318
- .chips { display: none; }
2319
- }
2320
- `,cg=({media:e,to:t})=>{let n=tg(),r=tm(e.covers),i=e.covers?.find(e=>e.color)?.color,a=Xh(Kh(e,n)??0),o=e.nextAiringEpisode?.episodeNumber,s=hs(e.type),c=_s(e.season,e.seasonYear),l=[s,qh(e.episodeCount)].filter(Boolean).join(` • `);return g(J,{to:t,css:sg,style:Yh(i),children:[j(`div`,{className:`cover`,style:r?{backgroundImage:`url(${r})`}:void 0,children:g(`div`,{className:`cover-text`,children:[j(`div`,{className:`title`,children:e.titles?.at(0)?.title}),c&&j(`div`,{className:`season`,children:c})]})}),g(`div`,{className:`detail`,children:[g(`div`,{className:`detail-top`,children:[j(`div`,{children:a&&o!=null?g(C,{children:[g(`div`,{className:`airing-label`,children:[`Ep `,o,` airing in`]}),j(`div`,{className:`airing-value airing`,children:a})]}):j(`div`,{className:`airing-value`,children:gs(e.status)??`Unknown status`})}),e.averageScore!=null&&j(og,{percent:e.averageScore})]}),l&&j(`div`,{className:`meta`,children:l}),j(`div`,{className:`description`,children:e.shortDescriptions?.at(0)?.shortDescription}),j(`div`,{className:`chips`,children:e.genres?.slice(0,2).map(e=>j(`span`,{className:`chip`,children:e.toLowerCase()},e))})]})]})},lg=l`
2321
- display: grid;
2322
- grid-template-columns: 5rem minmax(0, 1fr) 11rem 11rem 17rem;
2323
- align-items: center;
2324
- gap: 1.6rem;
2325
- padding: 1rem 1.6rem;
2326
- border-radius: 0.6rem;
2327
- background: rgba(255, 255, 255, 0.03);
2328
- color: rgba(255, 255, 255, 0.85);
2329
-
2330
- &:hover {
2331
- color: rgba(255, 255, 255, 0.85);
2332
- background: var(--accent-wash);
2333
- }
2334
-
2335
- &:hover .title { color: #fff; }
2336
-
2337
- .cover {
2338
- height: 7rem;
2339
- border-radius: 0.4rem;
2340
- background-color: #191919;
2341
- background-size: cover;
2342
- background-position: center;
2343
- }
2344
-
2345
- .heading { min-width: 0; }
2346
-
2347
- .title {
2348
- font-size: 1.6rem;
2349
- font-weight: 500;
2350
- color: rgba(255, 255, 255, 0.9);
2351
- overflow: hidden;
2352
- text-overflow: ellipsis;
2353
- white-space: nowrap;
2354
- }
2355
-
2356
- .chips {
2357
- display: flex;
2358
- flex-wrap: wrap;
2359
- gap: 0.5rem;
2360
- margin-top: 0.6rem;
2361
- }
2362
-
2363
- .chip {
2364
- padding: 0.3rem 0.9rem;
2365
- border-radius: 2rem;
2366
- background: var(--accent-soft);
2367
- color: var(--accent);
2368
- font-size: 1.15rem;
2369
- font-weight: 600;
2370
- white-space: nowrap;
2371
- }
2372
-
2373
- .column {
2374
- display: flex;
2375
- flex-direction: column;
2376
- gap: 0.4rem;
2377
- font-size: 1.4rem;
2378
- }
2379
-
2380
- .secondary {
2381
- font-size: 1.3rem;
2382
- color: rgba(255, 255, 255, 0.45);
2383
- }
2384
-
2385
- /* one place the numbers can differ in width without the column moving under them */
2386
- .column .secondary { font-variant-numeric: tabular-nums; }
2387
-
2388
- @media (max-width: 900px) {
2389
- grid-template-columns: 5rem minmax(0, 1fr) 11rem;
2390
- .format { display: none; }
2391
- }
2392
-
2393
- @media (max-width: 640px) {
2394
- grid-template-columns: 5rem minmax(0, 1fr);
2395
- gap: 1.2rem;
2396
- .score { display: none; }
2397
- .chips { display: none; }
2398
- }
2399
- `,ug=({media:e,to:t})=>{let n=tg(),r=tm(e.covers),i=e.covers?.find(e=>e.color)?.color,a=Xh(Kh(e,n)??0,1),o=e.nextAiringEpisode?.episodeNumber;return g(J,{to:t,css:lg,style:Yh(i),children:[j(`div`,{className:`cover`,style:r?{backgroundImage:`url(${r})`}:void 0}),g(`div`,{className:`heading`,children:[j(`div`,{className:`title`,children:e.titles?.at(0)?.title}),j(`div`,{className:`chips`,children:e.genres?.slice(0,5).map(e=>j(`span`,{className:`chip`,children:e.toLowerCase()},e))})]}),g(`div`,{className:`column score`,children:[e.averageScore!=null&&j(og,{percent:e.averageScore,size:17}),e.popularity!=null&&g(`span`,{className:`secondary`,children:[e.popularity.toLocaleString(),` users`]})]}),g(`div`,{className:`column format`,children:[j(`span`,{children:hs(e.type)}),e.episodeCount!=null&&j(`span`,{className:`secondary`,children:qh(e.episodeCount)})]}),g(`div`,{className:`column`,children:[j(`span`,{children:gs(e.status)}),a&&o!=null&&g(`span`,{className:`secondary airing`,children:[`Ep `,o,` airing in `,a]})]})]})},dg=[{value:`grid`,label:`Covers`},{value:`card`,label:`Cards`},{value:`list`,label:`List`}],fg=`grid`,pg=`stub-search-display-mode`,mg=dg.map(e=>e.value),hg=e=>mg.includes(e)?e:fg,gg=()=>{try{return globalThis.localStorage}catch{return}},_g=(e=gg())=>{try{return hg(e?.getItem(pg))}catch{return fg}},vg=(e,t=gg())=>{try{t?.setItem(pg,e)}catch{}},yg={grid:sc,card:oc,list:cc},bg=l`
2400
- display: inline-flex;
2401
- gap: 0.4rem;
2402
- padding: 0.4rem;
2403
- border-radius: 0.6rem;
2404
- background: rgba(255, 255, 255, 0.05);
2405
-
2406
- button {
2407
- display: flex;
2408
- align-items: center;
2409
- justify-content: center;
2410
- width: 3.4rem;
2411
- height: 3.4rem;
2412
- border: none;
2413
- border-radius: 0.4rem;
2414
- background: transparent;
2415
- color: rgba(255, 255, 255, 0.45);
2416
- cursor: pointer;
2417
- transition: background 0.15s, color 0.15s;
2418
- }
2419
-
2420
- button:hover { color: #fff; }
2421
-
2422
- button[aria-pressed="true"] {
2423
- background: rgba(255, 255, 255, 0.12);
2424
- color: #fff;
2425
- }
2426
- `,xg=({mode:e,onChange:t})=>j(`div`,{css:bg,role:`group`,"aria-label":`Result layout`,children:dg.map(n=>{let r=yg[n.value];return j(`button`,{type:`button`,title:n.label,"aria-label":n.label,"aria-pressed":e===n.value,onClick:()=>t(n.value),children:j(r,{size:18})},n.value)})});I();var Sg=l`
2427
- display: flex;
2428
- flex-direction: column;
2429
- gap: 0.7rem;
2430
- min-width: 0;
2431
-
2432
- .label {
2433
- font-size: 1.3rem;
2434
- color: rgba(255, 255, 255, 0.45);
2435
- }
2436
-
2437
- .control {
2438
- display: flex;
2439
- align-items: center;
2440
- gap: 0.8rem;
2441
- width: 100%;
2442
- height: 4.2rem;
2443
- padding: 0 1.2rem;
2444
- border-radius: 0.6rem;
2445
- border: 1px solid rgba(255, 255, 255, 0.15);
2446
- background: rgba(255, 255, 255, 0.04);
2447
- color: rgba(255, 255, 255, 0.85);
2448
- font-size: 1.5rem;
2449
- font-family: inherit;
2450
- cursor: pointer;
2451
- text-align: left;
2452
- transition: border-color 0.15s, background 0.15s;
2453
- }
2454
-
2455
- .control:hover { border-color: rgba(255, 255, 255, 0.3); }
2456
- .control.open { border-color: rgba(255, 255, 255, 0.5); }
2457
-
2458
- .control .value {
2459
- flex: 1;
2460
- min-width: 0;
2461
- overflow: hidden;
2462
- text-overflow: ellipsis;
2463
- white-space: nowrap;
2464
- }
2465
-
2466
- .control .value.any { color: rgba(255, 255, 255, 0.4); }
2467
-
2468
- .control .chevron {
2469
- flex-shrink: 0;
2470
- color: rgba(255, 255, 255, 0.4);
2471
- transition: transform 0.15s;
2472
- }
2473
-
2474
- .control.open .chevron { transform: rotate(180deg); }
2475
- `,Cg=l`
2476
- z-index: ${zd.filterMenu};
2477
- width: max-content;
2478
- min-width: 22rem;
2479
- max-width: 34rem;
2480
- padding: 0.6rem;
2481
- border-radius: 0.8rem;
2482
- border: 1px solid rgba(255, 255, 255, 0.15);
2483
- background: #17171a;
2484
- box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.6);
2485
- display: flex;
2486
- flex-direction: column;
2487
- gap: 0.4rem;
2488
-
2489
- .filter {
2490
- display: flex;
2491
- align-items: center;
2492
- gap: 0.7rem;
2493
- padding: 0 0.9rem;
2494
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
2495
- color: rgba(255, 255, 255, 0.4);
2496
- }
2497
-
2498
- .filter input {
2499
- flex: 1;
2500
- min-width: 0;
2501
- height: 3.4rem;
2502
- border: none;
2503
- outline: none;
2504
- background: transparent;
2505
- color: #fff;
2506
- font-size: 1.5rem;
2507
- font-family: inherit;
2508
- }
2509
-
2510
- .options {
2511
- display: flex;
2512
- flex-direction: column;
2513
- max-height: 32rem;
2514
- overflow-y: auto;
2515
- overscroll-behavior: contain;
2516
- }
2517
-
2518
- .option {
2519
- display: flex;
2520
- align-items: center;
2521
- gap: 0.8rem;
2522
- padding: 0.8rem 0.9rem;
2523
- border: none;
2524
- border-radius: 0.5rem;
2525
- background: transparent;
2526
- color: rgba(255, 255, 255, 0.8);
2527
- font-size: 1.5rem;
2528
- font-family: inherit;
2529
- text-align: left;
2530
- cursor: pointer;
2531
- }
2532
-
2533
- .option:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
2534
- .option.selected { color: #fff; }
2535
-
2536
- .option .tick {
2537
- flex-shrink: 0;
2538
- width: 1.6rem;
2539
- color: rgba(255, 255, 255, 0.9);
2540
- }
2541
-
2542
- .option .tick.hidden { visibility: hidden; }
2543
-
2544
- .empty {
2545
- padding: 1.2rem 0.9rem;
2546
- font-size: 1.4rem;
2547
- color: rgba(255, 255, 255, 0.4);
2548
- }
2549
- `,wg=({label:e,placeholder:t=`Any`,options:n,selected:r,onChange:i,multiple:a=!1,searchable:o=!1,allowCustom:s=!1})=>{let[c,l]=V(!1),[u,d]=V(``),f=`filter-${e.toLowerCase().replace(/[^a-z]+/g,`-`)}`,{refs:p,floatingStyles:m,context:h}=bd({open:c,onOpenChange:e=>{l(e),e||d(``)},placement:`bottom-start`,whileElementsMounted:_,middleware:[Ql(6),eu({padding:8}),$l({padding:8}),tu({padding:8,apply:({availableHeight:e,elements:t})=>{t.floating.style.maxHeight=`${Math.max(160,e)}px`}})]}),{getReferenceProps:v,getFloatingProps:y}=Sd([md(h),vd(h),wd(h,{role:`listbox`})]),b=r.map(e=>n.find(t=>t.value===e)?.label??e).join(`, `),x=B(()=>{let e=u.trim().toLowerCase(),t=e?n.filter(t=>t.label.toLowerCase().includes(e)):n;return!s||!e||t.some(t=>t.label.toLowerCase()===e)?t:[{value:u.trim(),label:u.trim()},...t]},[n,u,s]),S=e=>{if(!a){i(r.includes(e)?[]:[e]),l(!1),d(``);return}i(r.includes(e)?r.filter(t=>t!==e):[...r,e])};return g(`div`,{css:Sg,children:[j(`span`,{className:`label`,id:f,children:e}),g(`button`,{ref:p.setReference,type:`button`,className:c?`control open`:`control`,"aria-labelledby":f,...v(),children:[j(`span`,{className:r.length?`value`:`value any`,children:r.length?b:t}),j(ec,{size:16,className:`chevron`})]}),c&&j(Ju,{children:j(ad,{context:h,modal:!1,initialFocus:o?0:-1,children:g(`div`,{ref:p.setFloating,css:Cg,style:m,...y(),children:[o&&g(`div`,{className:`filter`,children:[j(gc,{size:15}),j(`input`,{type:`text`,value:u,placeholder:`Filter ${e.toLowerCase()}`,"aria-label":`Filter ${e.toLowerCase()}`,onInput:e=>d(e.currentTarget.value)})]}),j(`div`,{className:`options`,children:x.length?x.map(e=>g(`button`,{type:`button`,role:`option`,"aria-selected":r.includes(e.value),className:r.includes(e.value)?`option selected`:`option`,onClick:()=>S(e.value),children:[j($s,{size:16,className:r.includes(e.value)?`tick`:`tick hidden`}),j(`span`,{children:e.label})]},e.value)):g(`div`,{className:`empty`,children:[`Nothing matches “`,u,`”.`]})})]})})})]})},Tg=({label:e,children:t})=>g(`div`,{css:Sg,children:[j(`span`,{className:`label`,children:e}),t]});I();var Eg=Gf(`
2550
- subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {
2551
- mediaPage(input: $input) {
2552
- nodes {
2553
- ...MediaFragment
2554
- score
2555
- episodeCount
2556
- titles {
2557
- language
2558
- title
2559
- score
2560
- }
2561
- shortDescriptions(input: $shortDescriptionInput) {
2562
- language
2563
- shortDescription
2564
- }
2565
- covers {
2566
- language
2567
- url
2568
- color
2569
- }
2570
- banners {
2571
- language
2572
- url
2573
- }
2574
- trailers {
2575
- uri
2576
- origin
2577
- id
2578
- url
2579
- thumbnail
2580
- }
2581
- popularity
2582
- genres
2583
- tags
2584
- averageScore
2585
- status
2586
- type
2587
- season
2588
- seasonYear
2589
- nextAiringEpisode {
2590
- episodeNumber
2591
- airingAt
2592
- }
2593
- }
2594
- }
2595
- }
2596
- `),Dg=l`
2597
- padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
2598
- min-height: 100vh;
2599
-
2600
- .heading-row {
2601
- display: flex;
2602
- align-items: center;
2603
- justify-content: space-between;
2604
- gap: 1.6rem;
2605
- margin-bottom: 2rem;
2606
- }
2607
-
2608
- .heading {
2609
- font-size: 2.4rem;
2610
- font-weight: 600;
2611
- color: rgba(255, 255, 255, 0.85);
2612
- }
2613
-
2614
- /* one track per control, wrapping to as many rows as the viewport needs */
2615
- .filters {
2616
- display: grid;
2617
- grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
2618
- gap: 1.4rem 1.6rem;
2619
- margin-bottom: 1.6rem;
2620
- }
2621
-
2622
- .text-field {
2623
- display: flex;
2624
- align-items: center;
2625
- gap: 0.8rem;
2626
- height: 4.2rem;
2627
- padding: 0 1.2rem;
2628
- border-radius: 0.6rem;
2629
- border: 1px solid rgba(255, 255, 255, 0.15);
2630
- background: rgba(255, 255, 255, 0.04);
2631
- color: rgba(255, 255, 255, 0.4);
2632
- transition: border-color 0.15s;
2633
- }
2634
-
2635
- .text-field:focus-within { border-color: rgba(255, 255, 255, 0.5); }
2636
-
2637
- .text-field input {
2638
- flex: 1;
2639
- min-width: 0;
2640
- border: none;
2641
- outline: none;
2642
- background: transparent;
2643
- color: #fff;
2644
- font-size: 1.5rem;
2645
- font-family: inherit;
2646
- }
2647
-
2648
- .chips {
2649
- display: flex;
2650
- flex-wrap: wrap;
2651
- align-items: center;
2652
- gap: 0.6rem;
2653
- margin-bottom: 2.5rem;
2654
- min-height: 3rem;
2655
- }
2656
-
2657
- .chip {
2658
- display: flex;
2659
- align-items: center;
2660
- gap: 0.5rem;
2661
- padding: 0.4rem 0.6rem 0.4rem 1.1rem;
2662
- border-radius: 2rem;
2663
- border: 1px solid rgba(255, 255, 255, 0.15);
2664
- background: rgba(255, 255, 255, 0.06);
2665
- color: rgba(255, 255, 255, 0.85);
2666
- font-size: 1.4rem;
2667
- font-family: inherit;
2668
- cursor: pointer;
2669
- }
2670
-
2671
- .chip:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
2672
-
2673
- .chip-clear {
2674
- padding: 0.4rem 1.1rem;
2675
- border-radius: 2rem;
2676
- border: 1px solid transparent;
2677
- background: transparent;
2678
- color: rgba(255, 255, 255, 0.5);
2679
- font-size: 1.4rem;
2680
- font-family: inherit;
2681
- cursor: pointer;
2682
- }
2683
-
2684
- .chip-clear:hover { color: #fff; }
2685
-
2686
- .grid {
2687
- display: grid;
2688
- grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
2689
- gap: 2rem;
2690
- justify-items: center;
2691
- }
2692
-
2693
- /* 42rem is the narrowest a card stays readable at: below it the description loses its last line
2694
- before the cover gives up any width. */
2695
- .cards {
2696
- display: grid;
2697
- grid-template-columns: repeat(auto-fill, minmax(42rem, 1fr));
2698
- gap: 1.6rem;
2699
- }
2700
-
2701
- .rows {
2702
- display: flex;
2703
- flex-direction: column;
2704
- gap: 0.8rem;
2705
- }
2706
-
2707
- .status {
2708
- font-size: 1.8rem;
2709
- color: rgba(255, 255, 255, 0.5);
2710
- }
2711
-
2712
- @media (max-width: 768px) {
2713
- padding: calc(var(--stub-header-height) + 1rem) 1.5rem 3rem;
2714
-
2715
- .heading {
2716
- font-size: 2rem;
2717
- }
2718
-
2719
- .filters {
2720
- grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
2721
- }
2722
-
2723
- .grid {
2724
- grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
2725
- gap: 1.2rem;
2726
- }
2727
-
2728
- .cards {
2729
- grid-template-columns: 1fr;
2730
- gap: 1.2rem;
2731
- }
2732
- }
2733
- `,Og=(()=>{let e=[];for(let t=ss();t>=os;t--)e.push({value:String(t),label:String(t)});return e})(),kg=e=>({...e.query?{search:e.query}:{sorts:[jo.Popularity]},...e.category?{categories:[e.category]}:{},...e.status?{status:e.status}:{},...e.season?{season:e.season}:{},...e.year?{seasonYear:e.year}:{},...e.formats.length?{formats:e.formats}:{},...e.genres.length?{genres:e.genres}:{},...e.tags.length?{tags:e.tags}:{}}),Ag=()=>{let e=ho(),[,t]=mo(),n=B(()=>ls(e),[e]),r=vs(n),i=ys(n),a=e=>t(ps({...n,...e}),{replace:!0}),[o,s]=V(n.query),c=z(null);H(()=>{document.activeElement!==c.current&&s(e=>e.trim()===n.query?e:n.query)},[n.query]),H(()=>{if(o.trim()===n.query)return;let e=setTimeout(()=>a({query:o}),350);return()=>clearTimeout(e)},[o,e]);let l=B(()=>kg(n),[n]),[{data:u}]=kn({query:Eg,variables:{input:l,shortDescriptionInput:{count:1}},pause:!i}),[d,f]=V(_g),p=e=>{f(e),vg(e)},[m,h]=V(!1);H(()=>{h(!1);let e=setTimeout(()=>h(!0),5e3);return()=>clearTimeout(e)},[e]);let _=z(u),v=z(l);u!==_.current&&(_.current=u,v.current=l);let y=i&&v.current===l?u?.mediaPage?.nodes??[]:[],{genreOptions:b,tagOptions:x,genreKeys:S}=B(()=>{let e=new Map(Xo.map(e=>[e.toLowerCase(),e])),t=new Map;for(let t of n.genres)e.set(t.toLowerCase(),t);for(let e of n.tags)t.set(e.toLowerCase(),e);for(let n of y){for(let t of n.genres??[])e.has(t.toLowerCase())||e.set(t.toLowerCase(),t);for(let r of n.tags??[])!e.has(r.toLowerCase())&&!t.has(r.toLowerCase())&&t.set(r.toLowerCase(),r)}let r=(e,t)=>e.localeCompare(t);return{genreKeys:new Set(e.keys()),genreOptions:[...e.values()].sort(r).map(e=>({value:e,label:e})),tagOptions:[...t.values()].sort(r).map(e=>({value:e,label:e}))}},[y,n.genres,n.tags]),C=[...n.genres,...n.tags],w=e=>S.has(e.toLowerCase())||Qo(e),T=e=>a({genres:e.filter(w),tags:e.filter(e=>!w(e))}),E={grid:{className:`grid`,item:e=>j(rm,{media:e,to:X(Y.MEDIA,{uri:e.uri}),ellipsis:!1},e._id)},card:{className:`cards`,item:e=>j(cg,{media:e,to:X(Y.MEDIA,{uri:e.uri})},e._id)},list:{className:`rows`,item:e=>j(ug,{media:e,to:X(Y.MEDIA,{uri:e.uri})},e._id)}}[d],D=[...n.year?[{key:`year`,label:String(n.year),clear:{year:null}}]:[],...n.season?[{key:`season`,label:Jo.find(e=>e.value===n.season).label,clear:{season:null}}]:[],...n.status?[{key:`status`,label:qo.find(e=>e.value===n.status).label,clear:{status:null}}]:[],...n.category?[{key:`category`,label:Yo.find(e=>e.value===n.category).label,clear:{category:null}}]:[],...n.formats.map(e=>({key:`format:${e}`,label:Ko.find(t=>t.value===e).label,clear:{formats:n.formats.filter(t=>t!==e)}})),...n.genres.map(e=>({key:`genre:${e}`,label:e,clear:{genres:n.genres.filter(t=>t!==e)}})),...n.tags.map(e=>({key:`tag:${e}`,label:e,clear:{tags:n.tags.filter(t=>t!==e)}}))];return g(`div`,{css:Dg,children:[g(`div`,{className:`heading-row`,children:[j(`div`,{className:`heading`,children:ms(n)}),j(xg,{mode:d,onChange:p})]}),g(`div`,{className:`filters`,children:[j(Tg,{label:`Search`,children:g(`div`,{className:`text-field`,children:[j(gc,{size:17}),j(`input`,{ref:c,type:`text`,value:o,placeholder:`Any title`,"aria-label":`Search by title`,onInput:e=>s(e.currentTarget.value)})]})}),j(wg,{label:`Genres & Tags`,options:[...b,...x],selected:C,onChange:T,multiple:!0,searchable:!0,allowCustom:!0}),j(wg,{label:`Year`,options:Og,selected:n.year?[String(n.year)]:[],onChange:e=>a({year:e.length?Number(e[0]):null}),searchable:!0}),j(wg,{label:`Season`,options:Jo,selected:n.season?[n.season]:[],onChange:e=>a({season:e[0]??null})}),j(wg,{label:`Format`,options:Ko,selected:n.formats,onChange:e=>a({formats:e}),multiple:!0}),j(wg,{label:`Airing Status`,options:qo,selected:n.status?[n.status]:[],onChange:e=>a({status:e[0]??null})}),j(wg,{label:`Category`,options:Yo,selected:n.category?[n.category]:[],onChange:e=>a({category:e[0]??null})})]}),g(`div`,{className:`chips`,children:[D.map(e=>g(`button`,{type:`button`,className:`chip`,"aria-label":`Remove ${e.label}`,onClick:()=>a(e.clear),children:[e.label,j(Ec,{size:14})]},e.key)),D.length>1&&j(`button`,{type:`button`,className:`chip-clear`,onClick:()=>a({category:null,status:null,season:null,year:null,formats:[],genres:[],tags:[]}),children:`Clear filters`})]}),y.length?j(`div`,{className:E.className,children:y.map(E.item)}):i?j(`div`,{className:`status`,children:m?`No results found.`:`Searching…`}):r?j(`div`,{className:`status`,children:`Add a title, a season, a year, a format or a genre to browse.`}):j(`div`,{className:`status`,children:`Search by title, or pick a filter to browse.`})]})},jg=l`
2734
- max-width: 72rem;
2735
- margin: 0 auto;
2736
- padding: calc(var(--stub-header-height) + 3rem) 3rem 6rem;
2737
- color: rgba(255, 255, 255, 0.8);
2738
-
2739
- h1 {
2740
- font-size: 3rem;
2741
- font-weight: 700;
2742
- color: #fff;
2743
- margin-bottom: 0.6rem;
2744
- }
2745
-
2746
- .updated {
2747
- font-size: 1.3rem;
2748
- color: rgba(255, 255, 255, 0.4);
2749
- margin-bottom: 3rem;
2750
- }
2751
-
2752
- h2 {
2753
- font-size: 1.9rem;
2754
- font-weight: 600;
2755
- color: #fff;
2756
- margin: 3rem 0 1rem;
2757
- }
2758
-
2759
- p {
2760
- font-size: 1.5rem;
2761
- line-height: 1.7;
2762
- margin-bottom: 1rem;
2763
- }
2764
-
2765
- a {
2766
- color: #f47521;
2767
-
2768
- &:hover {
2769
- color: #ff8a3d;
2770
- }
2771
- }
2772
- `,Mg=({children:e})=>j(`div`,{css:jg,children:e}),Ng=()=>g(Mg,{children:[j(`h1`,{children:`Legal & Terms`}),j(`div`,{className:`updated`,children:`Last updated 1 June 2026`}),j(`p`,{children:`stub is an independent, non-commercial personal project, provided “as is” without warranties of any kind.`}),j(`h2`,{children:`No hosted content`}),j(`p`,{children:`stub hosts, stores, and distributes no media of its own. All titles, descriptions, artwork, ratings, and playback streams are retrieved on demand from third-party services (including AniList, MyAnimeList, Crunchyroll, JustWatch, and Netflix) and remain the property of their respective owners. You access those services with your own accounts and are responsible for complying with their terms.`}),j(`h2`,{children:`Personal use`}),j(`p`,{children:`stub is a technical showcase of in-browser media aggregation, intended for personal, non-commercial use. It is not a content provider.`}),j(`h2`,{children:`Privacy`}),g(`p`,{children:[`stub keeps no accounts and stores no personal data. See the`,` `,j(J,{href:X(Y.PRIVACY),children:`Privacy page`}),` for what is and isn’t handled when you use it.`]}),j(`h2`,{children:`Rights holders`}),g(`p`,{children:[`stub stores no content itself; anything you see lives on the third-party service it came from. If you are a rights holder with a concern, you can reach the maintainer through the project repository at`,` `,j(`a`,{href:`https://github.com/banou26/stub`,target:`_blank`,rel:`noreferrer noopener`,children:`github.com/banou26/stub`}),`.`]}),j(`h2`,{children:`Liability`}),j(`p`,{children:`stub is provided without warranty of any kind. The maintainer is not liable for any damages arising from its use, or for the availability, accuracy, or legality of any third-party service it connects to.`})]}),Pg=()=>g(Mg,{children:[j(`h1`,{children:`Privacy`}),j(`div`,{className:`updated`,children:`Last updated 1 June 2026`}),j(`p`,{children:`stub is an independent, non-commercial personal project. In short: it has no accounts, runs no analytics, and keeps nothing about you on a server.`}),j(`h2`,{children:`What stub stores`}),j(`p`,{children:`stub has no user accounts and no server-side database. Everything it shows is held in memory in your browser and is cleared when you refresh or close the tab. It sets no advertising or tracking cookies and runs no analytics or telemetry.`}),j(`h2`,{children:`Network requests & third parties`}),g(`p`,{children:[`To fetch titles, artwork, and streams, stub sends requests through the FKN platform proxy, which then reaches third-party services such as AniList, MyAnimeList, Crunchyroll, JustWatch, and Netflix. The proxy processes only the connection metadata needed to route and rate-limit a request (for example your IP address) and requires no account; how the FKN platform handles that data is described in the`,` `,j(`a`,{href:`https://fkn.app/privacy`,target:`_blank`,rel:`noreferrer noopener`,children:`FKN platform privacy policy`}),`. Each third-party service receives the requests made to it and applies its own privacy policy, especially when you sign in to one (for example Crunchyroll) to watch.`]}),j(`h2`,{children:`The optional browser extension`}),j(`p`,{children:`If you install the FKN browser extension, it works with your own already-logged-in sessions locally on your device so you can play content you have access to. Those credentials stay in your browser; stub never receives them.`}),j(`h2`,{children:`Your control`}),j(`p`,{children:`Because stub stores nothing persistently, closing or refreshing the tab clears all of its state. If you use the browser extension, you can review and revoke its access at any time from the extension itself.`}),j(`h2`,{children:`Contact`}),g(`p`,{children:[`Questions about privacy can be raised through the project repository at`,` `,j(`a`,{href:`https://github.com/banou26/stub`,target:`_blank`,rel:`noreferrer noopener`,children:`github.com/banou26/stub`}),`.`]})]}),Fg=[{origin:`omdb`,name:`OMDb`,label:`OMDb API key`,getUrl:`https://www.omdbapi.com/apikey.aspx`,help:`Free tier: 1,000 requests/day; choose the "FREE" account type on the form.`},{origin:`trakt`,name:`Trakt`,label:`Trakt Client ID`,getUrl:`https://trakt.tv/oauth/applications`,help:`Create an app at trakt.tv/oauth/applications, then copy its Client ID. Free; no OAuth needed for public metadata.`},{origin:`simkl`,name:`Simkl`,label:`Simkl Client ID`,getUrl:`https://simkl.com/settings/developer/new/`,help:`Create an app under Settings → Developer and paste its Client ID. Free for non-commercial use.`},{origin:`tvdb`,name:`TheTVDB`,label:`TheTVDB API key`,getUrl:`https://www.thetvdb.com/dashboard/account/apikey`,help:`Paid/subscriber v4 key. User-supported keys also need a PIN; enter it as apikey:pin (e.g. ab12cd34:5678).`},{origin:`watchmode`,name:`Watchmode`,label:`Watchmode API key`,getUrl:`https://api.watchmode.com/requestApiKey/`,help:`Free tier: ~1,000 requests/month. Request a key on the form and paste it here.`}],Ig=`stub.apikeys`,Lg=()=>{try{let e=localStorage.getItem(Ig);return e?JSON.parse(e):{}}catch{return{}}},Rg=(e=Lg())=>Gn(e),zg=e=>{let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e));return localStorage.setItem(Ig,JSON.stringify(t)),Rg(t)};I();var Bg=l`
2773
- max-width: 720px;
2774
- margin: calc(var(--stub-header-height) + 3rem) auto 4rem;
2775
- padding: 0 1.5rem;
2776
-
2777
- h1 { font-size: 2rem; margin-bottom: .25rem; }
2778
- h2 { font-size: 1.15rem; margin: 2rem 0 .25rem; }
2779
- .intro { opacity: .75; line-height: 1.55; }
2780
-
2781
- .keys { display: flex; flex-direction: column; gap: 1.5rem; margin: 1.5rem 0; }
2782
- .key-field { display: flex; flex-direction: column; gap: .4rem; }
2783
- .key-field label { font-weight: 600; }
2784
- .key-field input {
2785
- padding: .6rem .8rem;
2786
- border-radius: .4rem;
2787
- border: 1px solid rgba(255, 255, 255, .18);
2788
- background: rgba(255, 255, 255, .05);
2789
- color: inherit;
2790
- font-family: monospace;
2791
- }
2792
- .key-field input:focus { outline: none; border-color: rgba(255, 255, 255, .45); }
2793
- .help { font-size: .82rem; opacity: .65; }
2794
- .help a { color: inherit; text-decoration: underline; }
2795
-
2796
- .actions { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
2797
- button {
2798
- padding: .55rem 1.3rem;
2799
- border-radius: .4rem;
2800
- border: none;
2801
- cursor: pointer;
2802
- background: #fff;
2803
- color: #000;
2804
- font-weight: 600;
2805
- }
2806
- .saved { color: #4ade80; font-size: .9rem; }
2807
-
2808
- .add-uri { display: flex; gap: .6rem; margin-top: 1rem; }
2809
- .add-uri input {
2810
- flex: 1;
2811
- min-width: 0;
2812
- padding: .55rem .8rem;
2813
- border-radius: .4rem;
2814
- border: 1px solid rgba(255, 255, 255, .18);
2815
- background: rgba(255, 255, 255, .05);
2816
- color: inherit;
2817
- font-family: monospace;
2818
- }
2819
- .add-uri input:focus { outline: none; border-color: rgba(255, 255, 255, .45); }
2820
- .add-error { color: #f87171; font-size: .85rem; margin: .5rem 0 0; overflow-wrap: anywhere; }
2821
-
2822
- .plugins { display: flex; flex-direction: column; gap: .75rem; margin: 1.5rem 0; }
2823
- .plugin {
2824
- display: flex;
2825
- align-items: center;
2826
- gap: 1rem;
2827
- padding: .75rem 1rem;
2828
- border: 1px solid rgba(255, 255, 255, .12);
2829
- border-radius: .5rem;
2830
- }
2831
- .plugin .info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
2832
- .plugin .name { font-weight: 600; }
2833
- .plugin .uri { font-size: .8rem; opacity: .6; font-family: monospace; overflow-wrap: anywhere; }
2834
- .plugin .state { margin-left: auto; font-size: .82rem; opacity: .75; white-space: nowrap; }
2835
- .plugin .state.error { color: #f87171; opacity: 1; }
2836
- .plugin .remove {
2837
- background: none;
2838
- border: 1px solid rgba(255, 255, 255, .25);
2839
- color: inherit;
2840
- font-weight: 400;
2841
- padding: .35rem .8rem;
2842
- }
2843
- `,Vg=()=>{let[e,t]=V({}),[n,r]=V(!1),[i,a]=V(ar),[o,s]=V(``),[c,l]=V(``);return H(()=>{t(Lg())},[]),H(()=>(a(ar()),ir(()=>a(ar()))),[]),g(`div`,{css:Bg,children:[j(`h1`,{children:`Settings`}),j(`h2`,{children:`Sources`}),j(`p`,{className:`intro`,children:`Add community-made sources published on npm. They are installed through FKN, run isolated from stub, and only talk to it through a brokered connection.`}),i.length>0&&j(`div`,{className:`plugins`,children:i.map(e=>g(`div`,{className:`plugin`,children:[g(`div`,{className:`info`,children:[j(`span`,{className:`name`,children:e.sources?.length?e.sources.map(e=>e.name).join(`, `):e.uri}),g(`span`,{className:`uri`,children:[e.uri,e.sources&&e.sources.length>1?` · ${e.sources.length} sources`:``,e.rejected?.length?` · ${e.rejected.length} unavailable`:``]})]}),j(`span`,{className:`state${e.state===`error`?` error`:``}`,children:e.state===`connected`?`connected`:e.state===`error`?e.error??`error`:`connecting…`}),j(`button`,{type:`button`,className:`remove`,onClick:()=>{yr(e.uri).then(()=>a(ar()))},children:`Remove`})]},e.uri))}),j(`div`,{className:`actions`,children:j(`button`,{type:`button`,onClick:()=>{br().finally(()=>a(ar()))},children:`Add sources`})}),g(`form`,{className:`add-uri`,onSubmit:e=>{e.preventDefault();let t=o.trim();t&&(l(``),vr(t).then(()=>s(``)).catch(e=>l(e instanceof Error?e.message:String(e))).finally(()=>a(ar())))},children:[j(`input`,{type:`text`,autoComplete:`off`,spellcheck:!1,placeholder:`Or add one by address, e.g. npm:@banou/example or localhost:4599`,value:o,onInput:e=>s(e.target.value)}),j(`button`,{type:`submit`,children:`Add`})]}),c&&j(`p`,{className:`add-error`,children:c}),j(`h2`,{children:`API keys`}),j(`p`,{className:`intro`,children:`Some sources need your own API key. Keys are kept in this browser only and are used solely to authenticate your requests to that source. Leave a field blank to keep its source disabled.`}),g(`form`,{className:`keys`,onSubmit:t=>{t.preventDefault(),zg(e),r(!0),setTimeout(()=>r(!1),2e3)},children:[Fg.map(n=>g(`div`,{className:`key-field`,children:[j(`label`,{htmlFor:n.origin,children:n.label}),j(`input`,{id:n.origin,type:`password`,autoComplete:`off`,spellcheck:!1,placeholder:`Paste your ${n.name} key`,value:e[n.origin]??``,onInput:r=>t({...e,[n.origin]:r.target.value})}),g(`span`,{className:`help`,children:[n.help?`${n.help} `:``,j(`a`,{href:n.getUrl,target:`_blank`,rel:`noreferrer`,children:`Get a key →`})]})]},n.origin)),g(`div`,{className:`actions`,children:[j(`button`,{type:`submit`,children:`Save`}),n&&j(`span`,{className:`saved`,children:`Saved`})]})]})]})},Hg=e=>{let{onPlayback:t,applyPlayback:n}=e;if(!t||!n)return;let r=new Set,i=!1,a=e=>{if(!i&&nf(e))for(let t of r)t(e)},o=()=>{t(a).catch(()=>{})};return o(),{apply:e=>{n(e).catch(()=>{})},onReport:e=>(r.add(e),o(),()=>{r.delete(e)}),dispose:()=>{i=!0,r.clear()}}};I();var Ug=l`
2844
- position: relative;
2845
- width: 100%;
2846
- flex: 1;
2847
- min-height: 0;
2848
- background: #000;
2849
-
2850
- iframe {
2851
- display: block;
2852
- width: 100%;
2853
- height: 100%;
2854
- border: none;
2855
- }
2856
-
2857
- .failed {
2858
- position: absolute;
2859
- inset: 0;
2860
- display: flex;
2861
- align-items: center;
2862
- justify-content: center;
2863
- padding: 2rem;
2864
- text-align: center;
2865
- background: #000;
2866
- color: rgba(255, 255, 255, 0.55);
2867
- font-size: 1.4rem;
2868
- }
2869
- `,Wg=({pluginUri:e,release:t,onUnplayable:n,onPlayback:r})=>{let i=z(null),[a,o]=V(``),s=z({onUnplayable:n,onPlayback:r});return s.current={onUnplayable:n,onPlayback:r},H(()=>{let n=i.current;if(!n)return;let r=!1,a,c;return o(``),(async()=>{try{let i=await x.mount(e,{iframe:n,protocol:Qn});if(r){i.unmount();return}a=i;let{origin:o}=p(t.uri),l=i.remote,u=l.sources?.find(e=>e.origin===o)??l,d=await u.play?.({uri:t.uri,url:t.url});if(r)return;if(!d){i.unmount(),a=void 0,s.current.onUnplayable();return}c=Hg(u),c&&s.current.onPlayback?.(c)}catch(e){if(r)return;o(e instanceof Error?e.message:String(e))}})(),()=>{r=!0,c&&(c.dispose(),s.current.onPlayback?.(void 0)),a?.unmount()}},[e,t.uri,t.url]),g(`div`,{css:Ug,children:[j(`iframe`,{ref:i,sandbox:`allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox`,allow:`fullscreen; autoplay; encrypted-media; cross-origin-isolated`}),a?g(`div`,{className:`failed`,children:[`This source could not start playback. `,a]}):null]})};I();var Gg=({link:e})=>{let t=Af(),n=t.status===`active`?t.role:void 0,r=z(void 0);return H(()=>{if(r.current=void 0,!e||!n)return;let t=e.onReport(t=>{n===`host`?($.setPlayback(t),$.send({t:`playback`,s:t})):r.current&&e.apply(lf(r.current.state,r.current.receivedAt,Date.now()),r.current.measured)});return()=>{t(),n===`host`&&$.setPlayback(void 0)}},[n,e]),jf(t=>{if(n!==`guest`)return;let i=t.t===`playback`||t.t===`state`?t.s:void 0;if(!i)return;let a=location.pathname+location.search;if($.hostPath()!==a)return;let o=$.hostClock(),s=o?{...i,at:ff(i.at,o.offset)}:i;r.current={state:s,receivedAt:Date.now(),measured:!!o},e?.apply(s,!!o)}),null},Kg=[`play`,`pause`,`seeked`,`ratechange`],qg=e=>({paused:e.paused,time:e.currentTime,rate:e.playbackRate??1,at:Date.now()}),Jg=(e,t=()=>{})=>{let n=new Set,r=()=>{let t=qg(e);for(let e of n)e(t)};for(let t of Kg)e.addEventListener(t,r);let i=setInterval(()=>{e.paused||r()},af);return{apply:(t,n)=>{let r=cf(qg(e),t,Date.now(),n);r.seek!==void 0&&(e.currentTime=r.seek),r.rate!==void 0&&(e.playbackRate=r.rate),r.pause&&e.pause(),r.play&&(e.autoplay?e.autoplay():e.play()).catch(()=>{})},onReport:e=>(n.add(e),queueMicrotask(r),()=>{n.delete(e)}),dispose:()=>{for(let t of Kg)e.removeEventListener(t,r);clearInterval(i),n.clear(),t()}}},Yg=e=>{let t=Se(e,{origin:location.origin});return Jg(t,()=>t.destroy())};I();var Xg=e=>(e??[]).filter(e=>e.relation===`SAME_AS`).map(e=>e.node),Zg=Gf(`
2870
- subscription GetWatchMedia($input: MediaInput!) {
2871
- media(input: $input) {
2872
- _id
2873
- uri
2874
- origin
2875
- id
2876
- titles {
2877
- title
2878
- }
2879
- episodes {
2880
- ...EpisodeFragment
2881
- episodeNumber
2882
- titles {
2883
- title
2884
- }
2885
- thumbnails {
2886
- url
2887
- }
2888
- handles {
2889
- relation
2890
- node {
2891
- _id
2892
- uri
2893
- origin
2894
- id
2895
- url
2896
- embedUrl
2897
- mediaUri
2898
- episodeNumber
2899
- titles {
2900
- title
2901
- }
2902
- shortDescriptions {
2903
- language
2904
- shortDescription
2905
- }
2906
- }
2907
- }
2908
- }
2909
- handles {
2910
- relation
2911
- node {
2912
- ...MediaFragment
2913
- handles {
2914
- relation
2915
- node {
2916
- ...MediaFragment
2917
- episodes {
2918
- ...EpisodeFragment
2919
- }
2920
- }
2921
- }
2922
- episodes {
2923
- ...EpisodeFragment
2924
- episodeNumber
2925
- }
2926
- }
2927
- }
2928
- }
2929
- }
2930
- `),Qg=Gf(`
2931
- subscription GetWatchOrigins($input: OriginPageInput!) {
2932
- originPage(input: $input) {
2933
- nodes {
2934
- id
2935
- url
2936
- name
2937
- icon
2938
- color
2939
- isApiOnly
2940
- }
2941
- }
2942
- }
2943
- `),$g=l`
2944
- display: flex;
2945
- flex-direction: column;
2946
- height: 100vh;
2947
- /* The bar is fixed, so it takes no room in the flow and every other route pads itself out from
2948
- under it. This one has to as well: without the reservation the header floats over the top strip
2949
- of the player, which is exactly where the source puts its own title and controls. The height is
2950
- the whole viewport minus that strip, which border-box gives us for free. */
2951
- padding-top: var(--stub-header-height);
2952
- overflow: hidden;
2953
- color: rgb(255, 255, 255);
2954
-
2955
- .watch-container {
2956
- display: flex;
2957
- flex-direction: column;
2958
- flex: 1;
2959
- min-height: 0;
2960
- }
2961
-
2962
- .player-container {
2963
- position: relative;
2964
- flex: 1;
2965
- min-height: 0;
2966
-
2967
- .player-loading {
2968
- position: absolute;
2969
- inset: 0;
2970
- display: flex;
2971
- align-items: center;
2972
- justify-content: center;
2973
- background: #000;
2974
- font-size: 1.4rem;
2975
- opacity: 0.7;
2976
- }
2977
- }
2978
-
2979
- .watch-info {
2980
- display: flex;
2981
- flex-direction: column;
2982
- gap: 1.2rem;
2983
- padding: 1.6rem 2.4rem;
2984
- width: 100%;
2985
- max-width: 2200px;
2986
- margin: 0 auto;
2987
- box-sizing: border-box;
2988
- }
2989
-
2990
- .episode-info {
2991
- display: flex;
2992
- flex-direction: column;
2993
- gap: 0.4rem;
2994
-
2995
- .episode-title {
2996
- font-size: 1.8rem;
2997
- font-weight: 600;
2998
- }
2999
-
3000
- .media-title {
3001
- font-size: 1.2rem;
3002
- opacity: 0.6;
3003
- }
3004
- }
3005
- `,e_=()=>{let e=fo(),t={...e,mediaUri:O(e.mediaUri),episodeUri:O(e.episodeUri),sourceUri:O(e.sourceUri)},[,n]=mo(),r=z(null),[i,a]=V(void 0),[{data:o}]=kn({query:Zg,variables:{input:{uri:t.mediaUri}},pause:!t.mediaUri}),s=o?.media,c=B(()=>s?.episodes?.find(e=>e.uri&&t.episodeUri?k(e.uri,t.episodeUri):!1),[s?.episodes,t.episodeUri]),u=B(()=>c?.uri?b(c.uri)?.handleUrisValues:void 0,[c?.uri]),d=B(()=>u&&[...new Set(u.map(e=>e.origin))],[u]),[{data:f}]=kn({query:Qg,variables:{input:{ids:d,filters:[Po.IsNotApiOnly]}},pause:!d}),m=t.sourceUri,h=s?.titles?.at(0)?.title,_=c?.titles?.at(0)?.title,v=c?.episodeNumber,y=B(()=>{if(!m)return;let e=Xg(c?.handles).find(e=>e.uri===m);if(!e)return;if(e.embedUrl)return e.embedUrl;let{origin:n}=p(m);if(!(!A(n)||!e.url))return`/embed.html?${new URLSearchParams({mediaUri:t.mediaUri,episodeUri:t.episodeUri,sourceUri:m,url:e.url})}`},[m,c?.handles,t.mediaUri,t.episodeUri]),x=(f?.originPage?.nodes??[]).map(e=>e.id).join(`,`),[S,C]=V({}),[w,T]=V({});H(()=>{let e=!1,t=x?x.split(`,`):[],n=async e=>Object.fromEntries((await Promise.all(t.map(async t=>[t,(await e(t))?.pluginUri]))).filter(e=>!!e[1]));return Promise.all([n(Jn),n(Yn)]).then(([t,n])=>{e||(C(t),T(n))}).catch(()=>{}),()=>{e=!0}},[x]);let E=B(()=>{if(!m)return;let{origin:e}=p(m),t=w[e];if(!t)return;let n=Xg(c?.handles).find(e=>e.uri===m);return{pluginUri:t,release:{uri:m,url:n?.url??void 0}}},[m,w,c?.handles]),[D,M]=V();H(()=>{M(void 0)},[m]);let N=!!(E&&D!==m);H(()=>{let e=r.current;if(N||!y||!e)return;let t=Yg(e);return a(t),()=>{t.dispose(),a(void 0)}},[N,y]);let P=B(()=>(f?.originPage?.nodes??[]).map(e=>{let n=Xg(c?.handles).filter(t=>t.origin===e.id),r=!!w[e.id],i=t=>!!(t?.embedUrl||r||A(e.id)&&t?.url),a=e=>X(Y.WATCH,{mediaUri:t.mediaUri,episodeUri:t.episodeUri,sourceUri:e}),o=n.map(e=>({uri:e.uri,label:e.shortDescriptions?.at(0)?.shortDescription??e.titles?.at(0)?.title??p(e.uri).id,href:i(e)?a(e.uri):e.url??void 0,external:!i(e),active:m===e.uri})),s=n.at(0);return{id:e.id,name:e.name??e.id,icon:e.icon,color:e.color,href:s?o.at(0)?.href:void 0,external:s?!i(s):!0,active:o.some(e=>e.active),releases:o.length>1?o:void 0,picker:S[e.id]?{pluginUri:S[e.id]}:void 0}}),[f,c?.handles,t.mediaUri,t.episodeUri,m,S,w]);return j(`div`,{css:$g,children:g(`div`,{className:`watch-container`,children:[N&&E?j(Wg,{pluginUri:E.pluginUri,release:E.release,onUnplayable:()=>M(m),onPlayback:a}):y?j(`iframe`,{ref:r,src:y,referrerPolicy:`no-referrer`,allow:`encrypted-media; autoplay; fullscreen;`,css:l`
3006
- width: 100%;
3007
- border: none;
3008
- background: #000;
3009
- flex: 1;
3010
- min-height: 0;
3011
- `}):void 0,j(Gg,{link:i}),g(`div`,{className:`watch-info`,children:[g(`div`,{className:`episode-info`,children:[j(`div`,{className:`episode-title`,children:_?`${v==null?``:`E${v} - `}${_}`:v==null?t.episodeUri:`Episode ${v}`}),h?j(`div`,{className:`media-title`,children:h}):void 0]}),j(Sh,{sources:P,onPickRelease:e=>n(X(Y.WATCH,{mediaUri:t.mediaUri,episodeUri:t.episodeUri,sourceUri:e}))})]})]})})};I();var t_=l`
3012
- padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
3013
- min-height: 100vh;
3014
- max-width: 72rem;
3015
-
3016
- .heading {
3017
- font-size: 2.4rem;
3018
- font-weight: 600;
3019
- margin-bottom: 1rem;
3020
- color: rgba(255, 255, 255, 0.85);
3021
- }
3022
-
3023
- .status {
3024
- font-size: 1.6rem;
3025
- color: rgba(255, 255, 255, 0.5);
3026
- max-width: 60ch;
3027
- line-height: 1.5;
3028
- }
3029
-
3030
- a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; }
3031
-
3032
- .section {
3033
- margin-top: 2.4rem;
3034
- }
3035
-
3036
- .label {
3037
- font-size: 1.1rem;
3038
- font-weight: 700;
3039
- letter-spacing: 0.06em;
3040
- text-transform: uppercase;
3041
- color: rgba(255, 255, 255, 0.45);
3042
- margin-bottom: 0.8rem;
3043
- }
3044
-
3045
- .row {
3046
- display: flex;
3047
- align-items: center;
3048
- gap: 1rem;
3049
- padding: 0.8rem 1rem;
3050
- border-radius: 0.6rem;
3051
- background: rgba(255, 255, 255, 0.04);
3052
- }
3053
-
3054
- .row + .row { margin-top: 0.6rem; }
3055
-
3056
- .row .id {
3057
- flex: 1;
3058
- min-width: 0;
3059
- font-family: ui-monospace, monospace;
3060
- font-size: 1.3rem;
3061
- color: rgba(255, 255, 255, 0.75);
3062
- overflow: hidden;
3063
- text-overflow: ellipsis;
3064
- white-space: nowrap;
3065
- }
3066
-
3067
- .row .name {
3068
- font-size: 1.4rem;
3069
- font-weight: 600;
3070
- color: #fff;
3071
- }
3072
-
3073
- .badge {
3074
- padding: 0.2rem 0.6rem;
3075
- border-radius: 0.4rem;
3076
- background: rgba(74, 222, 128, 0.18);
3077
- color: #4ade80;
3078
- font-size: 1.1rem;
3079
- font-weight: 700;
3080
- text-transform: uppercase;
3081
- letter-spacing: 0.04em;
3082
- }
3083
-
3084
- .badge.you { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); }
3085
-
3086
- button, input {
3087
- font-family: inherit;
3088
- }
3089
-
3090
- .action {
3091
- display: inline-flex;
3092
- align-items: center;
3093
- gap: 0.5rem;
3094
- padding: 0.5rem 0.9rem;
3095
- border: 1px solid rgba(255, 255, 255, 0.15);
3096
- border-radius: 0.5rem;
3097
- background: transparent;
3098
- color: rgba(255, 255, 255, 0.8);
3099
- font-size: 1.2rem;
3100
- cursor: pointer;
3101
- }
3102
-
3103
- .action:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
3104
- .action.danger:hover { border-color: #f87171; color: #f87171; }
3105
-
3106
- .field {
3107
- display: flex;
3108
- gap: 0.6rem;
3109
- }
3110
-
3111
- .field input {
3112
- flex: 1;
3113
- min-width: 0;
3114
- height: 3.6rem;
3115
- padding: 0 1rem;
3116
- border: 1px solid rgba(255, 255, 255, 0.15);
3117
- border-radius: 0.5rem;
3118
- background: rgba(255, 255, 255, 0.04);
3119
- color: #fff;
3120
- font-size: 1.4rem;
3121
- outline: none;
3122
- }
3123
-
3124
- .field input:focus { border-color: rgba(255, 255, 255, 0.4); }
3125
- `,n_={"not-found":`That party has ended.`,"bad-key":`The invite link is not valid.`,invalid:`The invite link is broken.`,full:`The party is full.`,blocked:`You cannot join this party.`,unavailable:`Parties are not available right now. Is FKN connected?`},r_=()=>{let e=Af(),[t]=V(()=>wf(location.hash,location.origin)),[n]=V(()=>location.hash.length>1&&!wf(location.hash,location.origin)),[r,i]=V([]),[a,o]=V(()=>$.name()??``),[s,c]=V(!1),l=e.status===`active`;H(()=>{if(!t)return;let e=$.getState();(e.status===`joining`||e.status===`active`)&&e.invite===t||$.join(t)},[t]),H(()=>{if(!l){i([]);return}let e=!1;return $.roster().then(t=>{e||i(t)}),()=>{e=!0}},[l,l?e.members:0]),jf(e=>{e.t===`name`&&$.roster().then(i)}),H(()=>{if(!s)return;let e=setTimeout(()=>c(!1),1500);return()=>clearTimeout(e)},[s]);let u=l?Cf(location.origin,e.invite):void 0,d=async()=>{if(u)try{await navigator.clipboard.writeText(u),c(!0)}catch{}};return g(`div`,{css:t_,children:[j(`div`,{className:`heading`,children:`Watch together`}),g(`div`,{className:`status`,children:[n?j(C,{children:`This invite link is broken. Ask the host for a new one.`}):!t&&!l&&e.status!==`joining`?e.status===`failed`?g(C,{children:[`Could not join. `,n_[e.code]??`Something went wrong.`]}):e.status===`ended`?j(C,{children:`The party ended.`}):j(C,{children:`You are not in a party. Start one from the header, or open an invite link.`}):!t&&e.status===`joining`?j(C,{children:`Joining the party…`}):t&&!l?e.status===`joining`?j(C,{children:`Joining the party…`}):e.status===`failed`?g(C,{children:[`Could not join. `,n_[e.code]??`Something went wrong.`]}):e.status===`ended`?j(C,{children:`The party ended.`}):j(C,{children:`This invite link is broken. Ask the host for a new one.`}):l&&e.role===`guest`&&t?j(C,{children:`You are in. Waiting for the host…`}):l&&e.role===`guest`?g(C,{children:[`You are following the host. `,j(J,{to:X(Y.HOME),children:`Go home`}),` and Catch up from the header to rejoin them.`]}):j(C,{children:`You are hosting. Everyone here follows you, and you decide who stays.`}),!t&&!l&&e.status!==`joining`&&(e.status===`failed`||e.status===`ended`)?g(C,{children:[` `,j(`button`,{type:`button`,className:`action`,onClick:()=>$.dismiss(),children:`OK`})]}):null]}),l&&g(C,{children:[g(`div`,{className:`section`,children:[j(`div`,{className:`label`,children:`Your name`}),g(`form`,{className:`field`,onSubmit:e=>{e.preventDefault(),$.setName(Xd(a))},children:[j(`input`,{value:a,maxLength:32,placeholder:`What the party should call you`,"aria-label":`Your name`,onInput:e=>o(e.currentTarget.value)}),g(`button`,{type:`submit`,className:`action`,children:[j($s,{size:14}),` Save`]})]})]}),g(`div`,{className:`section`,children:[j(`div`,{className:`label`,children:`Invite link`}),g(`div`,{className:`field`,children:[j(`input`,{readOnly:!0,value:u,"aria-label":`Invite link`,onFocus:e=>e.currentTarget.select()}),g(`button`,{type:`button`,className:`action`,onClick:()=>{d()},children:[j(s?$s:rc,{size:14}),` Copy`]})]})]}),g(`div`,{className:`section`,children:[g(`div`,{className:`label`,children:[`In the party (`,r.length,`)`]}),r.map(t=>g(`div`,{className:`row`,"data-member":t.id,children:[t.name?j(`span`,{className:`name`,children:t.name}):null,j(`span`,{className:`id`,title:t.id,children:t.id}),t.host&&j(`span`,{className:`badge`,children:`host`}),t.self&&j(`span`,{className:`badge you`,children:`you`}),e.role===`host`&&!t.self&&g(C,{children:[g(`button`,{type:`button`,className:`action danger`,onClick:()=>{$.kick(t.id)},children:[j(bc,{size:14}),` Kick`]}),g(`button`,{type:`button`,className:`action danger`,onClick:()=>{$.ban(t.id)},children:[j(Qs,{size:14}),` Ban`]})]})]},t.id))]}),j(`div`,{className:`section`,children:g(`button`,{type:`button`,className:`action`,onClick:()=>{$.leave()},children:[j(lc,{size:14}),` `,e.role===`host`?`End party`:`Leave party`]})})]})]})},i_=`[data-party-scroll]`,a_=()=>{let e=document.querySelectorAll(i_);for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.scrollHeight-n.clientHeight>0)return n}},o_=(e,t)=>t>0?Math.min(1,Math.max(0,e/t)):0,s_=()=>{let e=a_();return e?Math.max(0,e.scrollHeight-e.clientHeight):Math.max(0,document.documentElement.scrollHeight-window.innerHeight)},c_=()=>{let e=a_();return e?o_(e.scrollTop,e.scrollHeight-e.clientHeight):o_(window.scrollY,document.documentElement.scrollHeight-window.innerHeight)},l_=()=>{try{return window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0}catch{return!1}},u_=(e,t,n)=>!e||l_()?`instant`:t<=n*2?`smooth`:`instant`,d_=(e,{smooth:t}={})=>{let n=a_();if(n){let r=n.scrollHeight-n.clientHeight,i=r>0?e*r:0;n.scrollTo({top:i,behavior:u_(t,Math.abs(i-n.scrollTop),n.clientHeight)});return}let r=document.documentElement.scrollHeight-window.innerHeight,i=r>0?e*r:0;window.scrollTo({top:i,behavior:u_(t,Math.abs(i-window.scrollY),window.innerHeight)})};I();var f_=2,p_=8e3,m_=[`wheel`,`touchstart`,`keydown`,`pointerdown`],h_=60,g_=()=>{let e=Af(),[t,n]=mo(),r=ho(),i=r?`${t}?${r}`:t,a=e.status===`active`?e.role:void 0,o=t===Sf;H(()=>{a!==`host`||o||($.setLocation(i,c_()),$.send({t:`nav`,path:i}))},[a,i,o]),H(()=>{if(a!==`host`||o)return;let e=0,t,n=()=>{t=void 0,e=Date.now();let n=c_();$.setLocation(i,n),$.send({t:`scroll`,y:n})},r=()=>{if(t)return;let r=Math.max(0,1e3/f_-(Date.now()-e));t=setTimeout(n,r)};return document.addEventListener(`scroll`,r,{passive:!0,capture:!0}),()=>{document.removeEventListener(`scroll`,r,{capture:!0}),t&&clearTimeout(t)}},[a,i]);let s=z(void 0),c=z(0);H(()=>{if(s.current===void 0)return;let e=s.current;s.current=void 0;let t=0,n=-1,r=0,i=!1,a=c.current,o=Date.now()+p_,l=()=>{i=!0};for(let e of m_)document.addEventListener(e,l,{passive:!0});let u=()=>{cancelAnimationFrame(t);for(let e of m_)document.removeEventListener(e,l)};if(Mc(),e===0)return d_(0),u;let d=()=>{let s=s_();s===n?r+=1:(r=0,n=s);let l=s>0&&r>=h_;if(i||c.current!==a||l||Date.now()>o)return u();d_(e),t=requestAnimationFrame(d)};return t=requestAnimationFrame(d),u},[i]);let l=z(!1);H(()=>{l.current=!1},[e.status===`active`?e.invite:void 0]);let u=(e,t)=>{l.current=!0,e===i?(Mc(),c.current+=1,d_(t,{smooth:!0})):(s.current=t,n(e))};return jf((e,{replayed:t})=>{if(a===`guest`)switch(e.t){case`nav`:l.current=!0,e.path!==i&&n(e.path);return;case`scroll`:$.hostPath()===i&&(Mc(),c.current+=1,d_(e.y,{smooth:!0}));return;case`state`:(!l.current||t)&&u(e.path,e.y);return}}),null};I();var __=4,v_=2500,y_=l`
3126
- position: fixed;
3127
- left: 0;
3128
- top: 0;
3129
- z-index: ${zd.partyCursor};
3130
- pointer-events: none;
3131
- display: flex;
3132
- align-items: flex-start;
3133
- gap: 0.4rem;
3134
- transform: translate(var(--x), var(--y));
3135
- transition: transform 0.12s linear, opacity 0.3s;
3136
- will-change: transform;
3137
-
3138
- svg {
3139
- filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
3140
- }
3141
-
3142
- .tag {
3143
- margin-top: 1.4rem;
3144
- padding: 0.2rem 0.6rem;
3145
- border-radius: 0.4rem;
3146
- background: #4ade80;
3147
- color: #06120a;
3148
- font-size: 1.1rem;
3149
- font-weight: 600;
3150
- white-space: nowrap;
3151
- }
3152
- `,b_=()=>{let e=Af(),t=e.status===`active`?e.role:void 0,[n]=mo(),r=ho(),i=r?`${n}?${r}`:n;H(()=>{if(t!==`host`)return;let e=0,n,r,i=()=>{n=void 0,!(!r||$.playing())&&(e=Date.now(),$.send({t:`cursor`,x:r.x,y:r.y}))},a=t=>{r={x:Math.min(1,Math.max(0,t.clientX/window.innerWidth)),y:Math.min(1,Math.max(0,t.clientY/window.innerHeight))},!n&&(n=setTimeout(i,Math.max(0,1e3/__-(Date.now()-e))))};return window.addEventListener(`pointermove`,a,{passive:!0}),()=>{window.removeEventListener(`pointermove`,a),n&&clearTimeout(n)}},[t]);let[a,o]=V(void 0),[s,c]=V(()=>Date.now()),l=z(!1);if(jf(e=>{if(t===`guest`){if(e.t===`playback`||e.t===`state`&&e.s){let t=(e.t,e.s);l.current=!t.paused,l.current&&o(void 0);return}e.t!==`cursor`||l.current||$.hostPath()===i&&o({x:e.x,y:e.y,at:Date.now()})}}),H(()=>{if(!a)return;let e=setInterval(()=>c(Date.now()),500);return()=>clearInterval(e)},[a]),t!==`guest`||!a||s-a.at>v_)return null;let u=e.status===`active`?$.nameOf(e.owner):void 0;return g(`div`,{css:y_,style:{"--x":`${a.x*100}vw`,"--y":`${a.y*100}vh`},"aria-hidden":`true`,children:[j(`svg`,{width:`18`,height:`22`,viewBox:`0 0 18 22`,fill:`none`,children:j(`path`,{d:`M2 2 L2 17 L6.5 13 L9.5 20 L12 19 L9 12.5 L15 12 Z`,fill:`#4ade80`,stroke:`#06120a`,strokeWidth:`1.2`,strokeLinejoin:`round`})}),j(`span`,{className:`tag`,children:u??`host`})]})};I();var x_=l`
3153
- position: fixed;
3154
- right: 2rem;
3155
- bottom: 2rem;
3156
- z-index: ${zd.headerPopup};
3157
- display: flex;
3158
- flex-direction: column;
3159
- align-items: flex-end;
3160
- gap: 1rem;
3161
-
3162
- .toggle {
3163
- position: relative;
3164
- display: flex;
3165
- align-items: center;
3166
- justify-content: center;
3167
- width: 4.8rem;
3168
- height: 4.8rem;
3169
- border: 1px solid rgba(255, 255, 255, 0.15);
3170
- border-radius: 50%;
3171
- background: #1a1a1a;
3172
- color: rgba(255, 255, 255, 0.85);
3173
- cursor: pointer;
3174
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
3175
- }
3176
-
3177
- .toggle:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
3178
-
3179
- .unread {
3180
- position: absolute;
3181
- top: -0.3rem;
3182
- right: -0.3rem;
3183
- min-width: 1.8rem;
3184
- height: 1.8rem;
3185
- padding: 0 0.5rem;
3186
- border-radius: 1rem;
3187
- background: #4ade80;
3188
- color: #06120a;
3189
- font-size: 1.1rem;
3190
- font-weight: 700;
3191
- line-height: 1.8rem;
3192
- text-align: center;
3193
- }
3194
-
3195
- .panel {
3196
- display: flex;
3197
- flex-direction: column;
3198
- width: min(32rem, calc(100vw - 4rem));
3199
- height: min(40rem, calc(100vh - 12rem));
3200
- border: 1px solid rgba(255, 255, 255, 0.12);
3201
- border-radius: 0.8rem;
3202
- background: #1a1a1a;
3203
- color: rgba(255, 255, 255, 0.85);
3204
- box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
3205
- overflow: hidden;
3206
- }
3207
-
3208
- .head {
3209
- display: flex;
3210
- align-items: center;
3211
- justify-content: space-between;
3212
- padding: 1rem 1.2rem;
3213
- border-bottom: 1px solid rgba(255, 255, 255, 0.08);
3214
- font-size: 1.3rem;
3215
- font-weight: 600;
3216
- }
3217
-
3218
- .head button {
3219
- display: flex;
3220
- border: none;
3221
- background: transparent;
3222
- color: rgba(255, 255, 255, 0.5);
3223
- cursor: pointer;
3224
- }
3225
-
3226
- .lines {
3227
- flex: 1;
3228
- min-height: 0;
3229
- overflow-y: auto;
3230
- padding: 1rem 1.2rem;
3231
- display: flex;
3232
- flex-direction: column;
3233
- gap: 0.6rem;
3234
- font-size: 1.3rem;
3235
- line-height: 1.4;
3236
- }
3237
-
3238
- .line { display: flex; flex-direction: column; gap: 0.1rem; }
3239
- .line .who { font-size: 1.1rem; color: rgba(255, 255, 255, 0.45); }
3240
- .line.self .who { color: #4ade80; }
3241
- .line .text { overflow-wrap: anywhere; }
3242
- .empty { color: rgba(255, 255, 255, 0.4); }
3243
-
3244
- form {
3245
- display: flex;
3246
- gap: 0.6rem;
3247
- padding: 0.8rem;
3248
- border-top: 1px solid rgba(255, 255, 255, 0.08);
3249
- }
3250
-
3251
- input {
3252
- flex: 1;
3253
- min-width: 0;
3254
- height: 3.4rem;
3255
- padding: 0 1rem;
3256
- border: 1px solid rgba(255, 255, 255, 0.12);
3257
- border-radius: 0.5rem;
3258
- background: rgba(255, 255, 255, 0.05);
3259
- color: #fff;
3260
- font-family: inherit;
3261
- font-size: 1.3rem;
3262
- outline: none;
3263
- }
3264
-
3265
- input:focus { border-color: rgba(255, 255, 255, 0.4); }
3266
-
3267
- form button {
3268
- display: flex;
3269
- align-items: center;
3270
- justify-content: center;
3271
- width: 3.4rem;
3272
- height: 3.4rem;
3273
- border: none;
3274
- border-radius: 0.5rem;
3275
- background: rgba(255, 255, 255, 0.1);
3276
- color: #fff;
3277
- cursor: pointer;
3278
- }
3279
- `,S_=(e,t)=>e.self?`you`:e.name??(e.from===t?`host`:e.from.slice(0,6)),C_=()=>{let e=Af(),t=e.status===`active`,[n,r]=V(!1),[i,a]=V(()=>$.chat()),[o,s]=V(0),[c,l]=V(``),u=z(null);if(jf((e,t)=>{e.t!==`chat`&&e.t!==`name`||(a($.chat()),e.t===`chat`&&!n&&!t.self&&s(e=>e+1))}),H(()=>{n&&s(0)},[n]),H(()=>{t||(a([]),s(0),r(!1))},[t]),H(()=>{u.current?.scrollTo({top:u.current.scrollHeight})},[i,n]),!t)return null;let d=e.owner;return g(`div`,{css:x_,children:[n&&g(`div`,{className:`panel`,role:`dialog`,"aria-label":`Party chat`,children:[g(`div`,{className:`head`,children:[j(`span`,{children:`Party chat`}),j(`button`,{type:`button`,"aria-label":`Close chat`,onClick:()=>r(!1),children:j(Ec,{size:16})})]}),g(`div`,{className:`lines`,ref:u,children:[i.length===0&&j(`div`,{className:`empty`,children:`Nothing said yet.`}),i.map(e=>g(`div`,{className:`line${e.self?` self`:``}`,children:[j(`span`,{className:`who`,children:S_(e,d)}),j(`span`,{className:`text`,children:e.text})]},e.seq))]}),g(`form`,{onSubmit:e=>{e.preventDefault();let t=Yd(c);t&&($.send({t:`chat`,text:t}),l(``))},children:[j(`input`,{value:c,placeholder:`Say something`,"aria-label":`Chat message`,maxLength:500,onInput:e=>l(e.currentTarget.value)}),j(`button`,{type:`submit`,"aria-label":`Send`,children:j(_c,{size:16})})]})]}),g(`button`,{type:`button`,className:`toggle`,"aria-label":n?`Hide chat`:`Show chat`,onClick:()=>r(e=>!e),children:[j(dc,{size:20}),o>0&&j(`span`,{className:`unread`,children:o})]})]})};I();var w_=()=>({pathname:location.pathname,search:location.search}),T_=[[`pushState`,`push`],[`replaceState`,`replace`],[`popstate`,`pop`]],E_=()=>{let e=z(w_());return H(()=>{let t=T_.map(([t,n])=>{let r=()=>{let t={from:e.current,to:w_(),kind:n,asked:Fc()};e.current=t.to,Oc(t)&&jc()};return addEventListener(t,r),()=>removeEventListener(t,r)});return()=>{Mc();for(let e of t)e()}},[]),null};I();var D_=()=>{let{query:e}=fo();return j(wo,{to:ps({query:fs(e)}),replace:!0})},O_=()=>(H(()=>{globalThis.close()},[]),j(`div`,{children:`Logging in... this window will close automatically.`})),k_=l`
3280
- display: flex;
3281
- flex-direction: column;
3282
- min-height: 100vh;
3283
-
3284
- & > .content {
3285
- flex: 1;
3286
- }
3287
- `,A_=l`
3288
- padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
3289
- `,j_=()=>j(vo,{hrefs:Hs,children:g(`div`,{css:k_,children:[j(Rf,{}),j(`div`,{className:`content`,children:g(Co,{children:[j(xo,{path:Do(Y.HOME),component:Gh}),j(xo,{path:Do(Y.MEDIA),component:Gh}),j(xo,{path:Do(Y.SEARCH),component:Ag}),j(xo,{path:Do(Y.SEARCH_LEGACY),component:D_}),j(xo,{path:Do(Y.LEGAL),component:Ng}),j(xo,{path:Do(Y.PRIVACY),component:Pg}),j(xo,{path:Do(Y.SETTINGS),component:Vg}),j(xo,{path:Do(Y.WATCH),component:e_}),j(xo,{path:Do(Y.PARTY),component:r_}),j(xo,{path:Do(Y.LOGIN_CALLBACK),component:O_}),j(xo,{component:()=>j(`div`,{css:A_,children:`404 No page found`})})]})}),j(Bf,{}),j(Uf,{}),j(g_,{}),j(b_,{}),j(C_,{}),j(E_,{})]})});Rn(location.href)&&(window.__stubExportStore=e=>Zn(e??{excludeOrigins:[]})),Rg();var M_=l`
3290
- @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,500;1,600;1,700;1,800;1,900&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
3291
-
3292
- :root {
3293
- color-scheme: dark;
3294
- /* the fixed header's own height. Every page that has to start below the bar reads this instead of
3295
- guessing, which is how /settings ended up 8px short of a header it never measured */
3296
- --stub-header-height: 7rem;
3297
- }
3298
-
3299
- @media (max-width: 768px) {
3300
- :root {
3301
- --stub-header-height: 6.4rem;
3302
- }
3303
- }
3304
-
3305
- *, *::before, *::after {
3306
- box-sizing: border-box;
3307
- margin: 0;
3308
- padding: 0;
3309
- }
3310
-
3311
- html {
3312
- font-size: 62.5%;
3313
- height: 100vh;
3314
- width: 100%;
3315
- }
3316
-
3317
- body {
3318
- margin: 0;
3319
- height: 100vh;
3320
- width: 100%;
3321
- font-size: 1.6rem;
3322
- font-family: Fira Sans;
3323
- background-color: #0f0f0f;
3324
- color: #fff;
3325
- font-family: Montserrat;
3326
- }
3327
-
3328
- #stub-root {
3329
- height: 100vh;
3330
- width: 100%;
3331
- }
3332
-
3333
- a {
3334
- color: #777777;
3335
- text-decoration: none;
3336
- }
3337
-
3338
- a:hover {
3339
- color: #fff;
3340
- }
3341
-
3342
- ul {
3343
- list-style: none;
3344
- }
3345
-
3346
- .hidden {
3347
- display: none !important;
3348
- }
3349
- `;$.resume();var N_=document.createElement(`div`);N_.id=`stub-root`,re(g(xn,{value:ja,children:[j(s,{styles:M_}),j(j_,{})]}),document.body.appendChild(N_));