@epic-web/workshop-app 5.1.2 → 5.3.0

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 (77) hide show
  1. package/build/client/assets/{_exerciseNumber-DarnXgbX.js → _exerciseNumber-Byb05FGg.js} +2 -2
  2. package/build/client/assets/_exerciseNumber-Byb05FGg.js.map +1 -0
  3. package/build/client/assets/_exerciseNumber_._stepNumber-BA2Xhzqs.js.map +1 -1
  4. package/build/client/assets/{_exerciseNumber_.finished-DEzaS_Ji.js → _exerciseNumber_.finished-DUqyxjV2.js} +2 -2
  5. package/build/client/assets/_exerciseNumber_.finished-DUqyxjV2.js.map +1 -0
  6. package/build/client/assets/{_layout-BTrPWpBz.js → _layout-BwDoP7Kv.js} +2 -2
  7. package/build/client/assets/_layout-BwDoP7Kv.js.map +1 -0
  8. package/build/client/assets/_layout-DvQmiuTm.js +6 -0
  9. package/build/client/assets/_layout-DvQmiuTm.js.map +1 -0
  10. package/build/client/assets/_layout-gyrNluke.js.map +1 -1
  11. package/build/client/assets/account-DbdZ0Vhg.js +2 -0
  12. package/build/client/assets/account-DbdZ0Vhg.js.map +1 -0
  13. package/build/client/assets/app-CM8yuYni.js.map +1 -1
  14. package/build/client/assets/{diff-jlCv3hv0.js → diff-Cmd66hnY.js} +2 -2
  15. package/build/client/assets/diff-Cmd66hnY.js.map +1 -0
  16. package/build/client/assets/{diff-assn_bSK.js → diff-CzHloS9Q.js} +2 -2
  17. package/build/client/assets/{diff-assn_bSK.js.map → diff-CzHloS9Q.js.map} +1 -1
  18. package/build/client/assets/{discord-CHsbqaqM.js → discord-DGeGrHNb.js} +2 -2
  19. package/build/client/assets/discord-DGeGrHNb.js.map +1 -0
  20. package/build/client/assets/discord-arMqZKbH.js +2 -0
  21. package/build/client/assets/discord-arMqZKbH.js.map +1 -0
  22. package/build/client/assets/{epic-video-GDpD7_Qt.js → epic-video-Dw5Vkxid.js} +2 -2
  23. package/build/client/assets/{epic-video-GDpD7_Qt.js.map → epic-video-Dw5Vkxid.js.map} +1 -1
  24. package/build/client/assets/{finished-DVV0zwmP.js → finished-DbOxW5dc.js} +2 -2
  25. package/build/client/assets/finished-DbOxW5dc.js.map +1 -0
  26. package/build/client/assets/{index-KgMLc41c.js → index-Bfqa72Xl.js} +2 -2
  27. package/build/client/assets/index-Bfqa72Xl.js.map +1 -0
  28. package/build/client/assets/{index-DJF1fiZI.js → index-D-V8b9oA.js} +2 -2
  29. package/build/client/assets/index-D-V8b9oA.js.map +1 -0
  30. package/build/client/assets/index-_J-F_Dnc.js.map +1 -1
  31. package/build/client/assets/login-pZYDEC_l.js.map +1 -1
  32. package/build/client/assets/{manifest-3338a6ab.js → manifest-0d355395.js} +1 -1
  33. package/build/client/assets/{mdx-hW1uYjc1.js → mdx-C01HZJEv.js} +2 -2
  34. package/build/client/assets/{mdx-hW1uYjc1.js.map → mdx-C01HZJEv.js.map} +1 -1
  35. package/build/client/assets/{onboarding-DCuSqnkZ.js → onboarding-Dk74xvlh.js} +2 -2
  36. package/build/client/assets/onboarding-Dk74xvlh.js.map +1 -0
  37. package/build/client/assets/pe-ChIwTk8v.js.map +1 -1
  38. package/build/client/assets/presence-DyppfK2V.js +28 -0
  39. package/build/client/assets/presence-DyppfK2V.js.map +1 -0
  40. package/build/client/assets/preview-CW_12I0i.js.map +1 -1
  41. package/build/client/assets/progress-DAB3nDa2.js.map +1 -1
  42. package/build/client/assets/{root-DojjHZlY.js → root-DCfiv1cO.js} +2 -2
  43. package/build/client/assets/{root-DojjHZlY.js.map → root-DCfiv1cO.js.map} +1 -1
  44. package/build/client/assets/{set-playground-DgnOJqFN.js → set-playground-S_rIwJAa.js} +2 -2
  45. package/build/client/assets/set-playground-S_rIwJAa.js.map +1 -0
  46. package/build/client/assets/{test-DJ7oeeeg.js → test-D_qZ9Wu9.js} +2 -2
  47. package/build/client/assets/test-D_qZ9Wu9.js.map +1 -0
  48. package/build/client/assets/{tests-Bw1rCopV.js → tests-Cmesc4Yz.js} +2 -2
  49. package/build/client/assets/tests-Cmesc4Yz.js.map +1 -0
  50. package/build/client/assets/user-AF5-S38o.js +2 -0
  51. package/build/client/assets/user-AF5-S38o.js.map +1 -0
  52. package/build/server/index.js +392 -256
  53. package/build/server/index.js.map +1 -1
  54. package/dist/server/index.js +0 -2
  55. package/package.json +4 -4
  56. package/build/client/assets/_exerciseNumber-DarnXgbX.js.map +0 -1
  57. package/build/client/assets/_exerciseNumber_.finished-DEzaS_Ji.js.map +0 -1
  58. package/build/client/assets/_layout-BTrPWpBz.js.map +0 -1
  59. package/build/client/assets/_layout-T2hZtl0D.js +0 -6
  60. package/build/client/assets/_layout-T2hZtl0D.js.map +0 -1
  61. package/build/client/assets/account-CPFwPYf1.js +0 -2
  62. package/build/client/assets/account-CPFwPYf1.js.map +0 -1
  63. package/build/client/assets/diff-jlCv3hv0.js.map +0 -1
  64. package/build/client/assets/discord-CHsbqaqM.js.map +0 -1
  65. package/build/client/assets/discord-DoeazikD.js +0 -2
  66. package/build/client/assets/discord-DoeazikD.js.map +0 -1
  67. package/build/client/assets/finished-DVV0zwmP.js.map +0 -1
  68. package/build/client/assets/index-DJF1fiZI.js.map +0 -1
  69. package/build/client/assets/index-KgMLc41c.js.map +0 -1
  70. package/build/client/assets/onboarding-DCuSqnkZ.js.map +0 -1
  71. package/build/client/assets/presence-CdyMdOKk.js +0 -28
  72. package/build/client/assets/presence-CdyMdOKk.js.map +0 -1
  73. package/build/client/assets/set-playground-DgnOJqFN.js.map +0 -1
  74. package/build/client/assets/test-DJ7oeeeg.js.map +0 -1
  75. package/build/client/assets/tests-Bw1rCopV.js.map +0 -1
  76. package/build/client/assets/user-BBryXlM_.js +0 -2
  77. package/build/client/assets/user-BBryXlM_.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord-DGeGrHNb.js","sources":["../../../app/routes/_app+/discord.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { Link, useLoaderData } from '@remix-run/react'\nimport { Icon } from '#app/components/icons.tsx'\nimport {\n\tuseOptionalDiscordMember,\n\tuseOptionalUser,\n} from '#app/components/user.tsx'\nimport { getDiscordAuthURL } from '../discord.callback.ts'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport async function loader() {\n\treturn { discordAuthUrl: getDiscordAuthURL() }\n}\n\nexport function useDiscordCTALink({\n\tdiscordAuthUrl,\n}: {\n\tdiscordAuthUrl: string\n}) {\n\tconst user = useOptionalUser()\n\tconst discordMember = useOptionalDiscordMember()\n\n\tif (!user) {\n\t\treturn '/login'\n\t}\n\tif (!discordMember) {\n\t\treturn discordAuthUrl\n\t}\n\n\treturn 'https://discord.com/channels/715220730605731931/1161045224907341972'\n}\n\nexport function DiscordCTA({ discordAuthUrl }: { discordAuthUrl: string }) {\n\tconst user = useOptionalUser()\n\tconst discordMember = useOptionalDiscordMember()\n\n\tif (!user) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-wrap items-center justify-center gap-2 text-xl\">\n\t\t\t\t<Link to=\"/login\" className=\"inline-flex items-center gap-2 underline\">\n\t\t\t\t\t<Icon name=\"Discord\" size=\"2xl\" />\n\t\t\t\t\tLogin\n\t\t\t\t</Link>{' '}\n\t\t\t\t<span>\n\t\t\t\t\tto get access to the exclusive{' '}\n\t\t\t\t\t<Link to=\"/discord\" className=\"underline\">\n\t\t\t\t\t\tdiscord channel\n\t\t\t\t\t</Link>\n\t\t\t\t\t.\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t)\n\t}\n\tif (!discordMember) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-wrap items-center justify-center gap-2 text-xl\">\n\t\t\t\t<Link to={discordAuthUrl} className=\"flex items-center gap-2 underline\">\n\t\t\t\t\t<Icon name=\"Discord\" size=\"2xl\" />\n\t\t\t\t\tConnect Discord\n\t\t\t\t</Link>{' '}\n\t\t\t\t<span>\n\t\t\t\t\tto get access to the exclusive{' '}\n\t\t\t\t\t<Link to=\"/discord\" className=\"underline\">\n\t\t\t\t\t\tdiscord channel\n\t\t\t\t\t</Link>\n\t\t\t\t\t.\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t)\n\t}\n\n\treturn (\n\t\t<div className=\"flex items-center justify-center gap-2 text-xl underline\">\n\t\t\t<Link to=\"discord://discord.com/channels/715220730605731931/1161045224907341972\">\n\t\t\t\t<Icon name=\"Discord\" size=\"2xl\" />\n\t\t\t</Link>\n\t\t\t<Link\n\t\t\t\tto=\"https://discord.com/channels/715220730605731931/1161045224907341972\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t>\n\t\t\t\tOpen Discord\n\t\t\t</Link>\n\t\t</div>\n\t)\n}\n\nexport default function DiscordRoute() {\n\tconst data = useLoaderData<typeof loader>()\n\n\treturn (\n\t\t<div className=\"container flex h-full max-w-3xl flex-col items-center justify-center gap-4 p-12\">\n\t\t\t<DiscordCTA discordAuthUrl={data.discordAuthUrl} />\n\t\t\t<p>\n\t\t\t\tThe{' '}\n\t\t\t\t<Link\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\tto=\"https://kentcdodds.com/discord\"\n\t\t\t\t>\n\t\t\t\t\tEpic Web Community on Discord\n\t\t\t\t</Link>{' '}\n\t\t\t\tis a great place to hang out with other developers who are working\n\t\t\t\tthrough this workshop. You can ask questions, get help, and solidify\n\t\t\t\twhat you're learning by helping others.\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<small className=\"text-sm\">\n\t\t\t\t\tIf you've not joined the Epic Web Community on Discord yet, you'll be\n\t\t\t\t\trequired to go through a short onboarding process first. A friendly\n\t\t\t\t\tbot will explain the process when you{' '}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tto=\"https://kcd.im/discord\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\tjoin\n\t\t\t\t\t</Link>\n\t\t\t\t\t.\n\t\t\t\t</small>\n\t\t\t</p>\n\t\t</div>\n\t)\n}\n"],"names":["handle","getSitemapEntries","useDiscordCTALink","discordAuthUrl","user","useOptionalUser","discordMember","useOptionalDiscordMember","DiscordCTA","jsxs","className","children","jsx","Link","to","Icon","name","size","target","rel","DiscordRoute","data","useLoaderData"],"mappings":"iLASO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAMO,SAASC,EAAkB,CACjCC,eAAAA,CACD,EAEG,CACF,MAAMC,EAAOC,IACPC,EAAgBC,IAEtB,OAAKH,EAGAE,EAIE,sEAHCH,EAHA,QAOT,CAEgB,SAAAK,EAAW,CAAEL,eAAAA,CAAe,EAA+B,CAC1E,MAAMC,EAAOC,IACPC,EAAgBC,IAEtB,OAAKH,EAiBAE,EAmBJG,EAAAA,KAAC,MAAI,CAAAC,UAAU,2DACdC,SAAA,CAACC,EAAA,IAAAC,EAAA,CAAKC,GAAG,wEACRH,SAAAC,EAAA,IAACG,GAAKC,KAAK,UAAUC,KAAK,MAAM,CACjC,CAAA,EACAL,EAAA,IAACC,EAAA,CACAC,GAAG,sEACHI,OAAO,SACPC,IAAI,sBACJR,SAAA,cAAA,CAED,CAAA,CACD,CAAA,EA5BCF,EAAAA,KAAC,MAAI,CAAAC,UAAU,2DACdC,SAAA,CAAAF,EAAA,KAACI,EAAK,CAAAC,GAAIX,EAAgBO,UAAU,oCACnCC,SAAA,CAAAC,EAAA,IAACG,EAAK,CAAAC,KAAK,UAAUC,KAAK,KAAM,CAAA,EAAE,iBAAA,EAEnC,EAAQ,WACP,OAAK,CAAAN,SAAA,CAAA,iCAC0B,UAC9BE,EAAK,CAAAC,GAAG,WAAWJ,UAAU,YAAYC,SAE1C,iBAAA,CAAA,EAAO,GAAA,CAER,CAAA,CAAA,CACD,CAAA,EA7BAF,EAAAA,KAAC,MAAI,CAAAC,UAAU,2DACdC,SAAA,CAAAF,EAAA,KAACI,EAAK,CAAAC,GAAG,SAASJ,UAAU,2CAC3BC,SAAA,CAAAC,EAAA,IAACG,EAAK,CAAAC,KAAK,UAAUC,KAAK,KAAM,CAAA,EAAE,OAAA,EAEnC,EAAQ,WACP,OAAK,CAAAN,SAAA,CAAA,iCAC0B,UAC9BE,EAAK,CAAAC,GAAG,WAAWJ,UAAU,YAAYC,SAE1C,iBAAA,CAAA,EAAO,GAAA,CAER,CAAA,CAAA,CACD,CAAA,CAmCH,CAEA,SAAwBS,GAAe,CACtC,MAAMC,EAAOC,IAGZ,OAAAb,EAAAA,KAAC,MAAI,CAAAC,UAAU,kFACdC,SAAA,CAACC,EAAA,IAAAJ,EAAA,CAAWL,eAAgBkB,EAAKlB,cAAgB,CAAA,SAChD,IAAE,CAAAQ,SAAA,CAAA,MACE,IACJC,EAAAA,IAACC,EAAA,CACAK,OAAO,SACPC,IAAI,sBACJT,UAAU,YACVI,GAAG,iCACHH,SAAA,+BAAA,CAED,EAAQ,IAAI,iLAAA,CAIb,CAAA,EACCC,EAAA,IAAA,IAAA,CACAD,SAACF,EAAA,KAAA,QAAA,CAAMC,UAAU,UAAUC,SAAA,CAAA,kLAGY,IACtCC,EAAAA,IAACC,EAAA,CACAC,GAAG,yBACHI,OAAO,SACPC,IAAI,sBACJT,UAAU,YACVC,SAAA,MAED,CAAA,EAAO,GAAA,EAER,CACD,CAAA,CAAA,CACD,CAAA,CAEF"}
@@ -0,0 +1,2 @@
1
+ import{a as i,h as e}from"./discord-DGeGrHNb.js";import"./index-BFGhCX_U.js";import"./misc-BJtHv_Jh.js";import"./components-9EGYHTc_.js";import"./user-AF5-S38o.js";export{i as default,e as handle};
2
+ //# sourceMappingURL=discord-arMqZKbH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord-arMqZKbH.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import{R as Gl,r as ft,j as H}from"./index-BFGhCX_U.js";import{u as Ib}from"./index-_J-F_Dnc.js";import{z as Vd}from"./request-info-DCIQLE6H.js";import{f as Rb,a as wb,I as Cb}from"./misc-BJtHv_Jh.js";import{a as Db,e as Mb,A as Pb,L as ja}from"./components-9EGYHTc_.js";import{L as Oh}from"./loading-Dk0n07O3.js";import{c as Ob}from"./user-BBryXlM_.js";import{u as Nb}from"./workshop-config-DJY2cXU_.js";var Fb=Object.create,$0=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,$b=Object.getOwnPropertyNames,Bb=Object.getPrototypeOf,Gb=Object.prototype.hasOwnProperty,B0=function(i,e){return function(){return i&&(e=i(i=0)),e}},xt=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}},Hb=function(i,e,t,r){if(e&&typeof e=="object"||typeof e=="function")for(var s=$b(e),n=0,a=s.length,o;n<a;n++)o=s[n],!Gb.call(i,o)&&o!==t&&$0(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(r=Ub(e,o))||r.enumerable});return i},Qt=function(i,e,t){return t=i!=null?Fb(Bb(i)):{},Hb(!i||!i.__esModule?$0(t,"default",{value:i,enumerable:!0}):t,i)},Li=xt(function(i,e){var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t={},e.exports=t});function hs(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):hs(i,e)}var fs=B0(function(){fs()});function Nh(i){"@swc/helpers - typeof";return i&&typeof Symbol<"u"&&i.constructor===Symbol?"symbol":typeof i}var Fh=B0(function(){}),G0=xt(function(i,e){var t=Array.prototype.slice;e.exports=r;function r(s,n){for(("length"in s)||(s=[s]),s=t.call(s);s.length;){var a=s.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(s=t.call(a.childNodes).concat(s))}}}),Wb=xt(function(i,e){fs(),e.exports=t;function t(r,s){if(!hs(this,t))return new t(r,s);this.data=r,this.nodeValue=r,this.length=r.length,this.ownerDocument=s||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),Kb=xt(function(i,e){fs(),e.exports=t;function t(r,s){if(!hs(this,t))return new t(r);this.data=r||"",this.length=this.data.length,this.ownerDocument=s||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(r,s,n){var a=this.data,o=a.substring(0,r),l=a.substring(r+s,a.length);this.data=o+n+l,this.length=this.data.length}}),H0=xt(function(i,e){e.exports=t;function t(r){var s=this,n=r.type;r.target||(r.target=s),s.listeners||(s.listeners={});var a=s.listeners[n];if(a)return a.forEach(function(o){r.currentTarget=s,typeof o=="function"?o(r):o.handleEvent(r)});s.parentNode&&s.parentNode.dispatchEvent(r)}}),W0=xt(function(i,e){e.exports=t;function t(r,s){var n=this;n.listeners||(n.listeners={}),n.listeners[r]||(n.listeners[r]=[]),n.listeners[r].indexOf(s)===-1&&n.listeners[r].push(s)}}),K0=xt(function(i,e){e.exports=t;function t(r,s){var n=this;if(n.listeners&&n.listeners[r]){var a=n.listeners[r],o=a.indexOf(s);o!==-1&&a.splice(o,1)}}}),Vb=xt(function(i,e){Fh(),e.exports=r;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function r(h){switch(h.nodeType){case 3:return u(h.data);case 8:return"<!--"+h.data+"-->";default:return s(h)}}function s(h){var f=[],m=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(m=m.toLowerCase()),f.push("<"+m+d(h)+o(h)),t.indexOf(m)>-1?f.push(" />"):(f.push(">"),h.childNodes.length?f.push.apply(f,h.childNodes.map(r)):h.textContent||h.innerText?f.push(u(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=Nh(h[f]);return f==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(f)&&(m==="string"||m==="boolean"||m==="number")&&f!=="nodeName"&&f!=="className"&&f!=="tagName"&&f!=="textContent"&&f!=="innerText"&&f!=="namespaceURI"&&f!=="innerHTML"}function a(h){if(typeof h=="string")return h;var f="";return Object.keys(h).forEach(function(m){var p=h[m];m=m.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}),f+=m+":"+p+";"}),f}function o(h){var f=h.dataset,m=[];for(var p in f)m.push({name:"data-"+p,value:f[p]});return m.length?l(m):""}function l(h){var f=[];return h.forEach(function(m){var p=m.name,g=m.value;p==="style"&&(g=a(g)),f.push(p+'="'+c(g)+'"')}),f.length?" "+f.join(" "):""}function d(h){var f=[];for(var m in h)n(h,m)&&f.push({name:m,value:h[m]});for(var p in h._attributes)for(var g in h._attributes[p]){var E=h._attributes[p][g],y=(E.prefix?E.prefix+":":"")+g;f.push({name:y,value:E.value})}return h.className&&f.push({name:"class",value:h.className}),f.length?l(f):""}function u(h){var f="";return typeof h=="string"?f=h:h&&(f=h.toString()),f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function c(h){return u(h).replace(/"/g,"&quot;")}}),V0=xt(function(i,e){fs();var t=G0(),r=H0(),s=W0(),n=K0(),a=Vb(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,u,c){if(!hs(this,l))return new l(d);var h=c===void 0?o:c||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=u||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=this.childNodes.indexOf(u);return u.parentNode=null,this.childNodes[c]=d,d.parentNode=this,u},l.prototype.removeChild=function(d){var u=this.childNodes.indexOf(d);return this.childNodes.splice(u,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=u==null?-1:this.childNodes.indexOf(u);return c>-1?this.childNodes.splice(c,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,u,c){var h=null,f=u,m=u.indexOf(":");if(m>-1&&(h=u.substr(0,m),f=u.substr(m+1)),this.tagName==="INPUT"&&u==="type")this.type=c;else{var p=this._attributes[d]||(this._attributes[d]={});p[f]={value:c,prefix:h}}},l.prototype.getAttributeNS=function(d,u){var c=this._attributes[d],h=c&&c[u]&&c[u].value;return this.tagName==="INPUT"&&u==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,u){var c=this._attributes[d];c&&delete c[u]},l.prototype.hasAttributeNS=function(d,u){var c=this._attributes[d];return!!c&&u in c},l.prototype.setAttribute=function(d,u){return this.setAttributeNS(null,d,u)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=n,l.prototype.addEventListener=s,l.prototype.dispatchEvent=r,l.prototype.focus=function(){},l.prototype.toString=function(){return a(this)},l.prototype.getElementsByClassName=function(d){var u=d.split(" "),c=[];return t(this,function(h){if(h.nodeType===1){var f=h.className||"",m=f.split(" ");u.every(function(p){return m.indexOf(p)!==-1})&&c.push(h)}}),c},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var u=[];return t(this.childNodes,function(c){c.nodeType===1&&(d==="*"||c.tagName.toLowerCase()===d)&&u.push(c)}),u},l.prototype.contains=function(d){return t(this,function(u){return d===u})||!1}}),qb=xt(function(i,e){fs();var t=V0();e.exports=r;function r(s){if(!hs(this,r))return new r;this.childNodes=[],this.parentNode=null,this.ownerDocument=s||null}r.prototype.type="DocumentFragment",r.prototype.nodeType=11,r.prototype.nodeName="#document-fragment",r.prototype.appendChild=t.prototype.appendChild,r.prototype.replaceChild=t.prototype.replaceChild,r.prototype.removeChild=t.prototype.removeChild,r.prototype.toString=function(){return this.childNodes.map(function(s){return String(s)}).join("")}}),Yb=xt(function(i,e){e.exports=t;function t(r){}t.prototype.initEvent=function(r,s,n){this.type=r,this.bubbles=s,this.cancelable=n},t.prototype.preventDefault=function(){}}),jb=xt(function(i,e){fs();var t=G0(),r=Wb(),s=Kb(),n=V0(),a=qb(),o=Yb(),l=H0(),d=W0(),u=K0();e.exports=c;function c(){if(!hs(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var h=c.prototype;h.createTextNode=function(f){return new s(f,this)},h.createElementNS=function(f,m){var p=f===null?null:String(f);return new n(m,this,p)},h.createElement=function(f){return new n(f,this)},h.createDocumentFragment=function(){return new a(this)},h.createEvent=function(f){return new o(f)},h.createComment=function(f){return new r(f,this)},h.getElementById=function(f){f=String(f);var m=t(this.childNodes,function(p){if(String(p.id)===f)return p});return m||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),zb=xt(function(i,e){var t=jb();e.exports=new t}),Xb=xt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},r=zb(),s;typeof document<"u"?s=document:(s=t["__GLOBAL_DOCUMENT_CACHE@4"],s||(s=t["__GLOBAL_DOCUMENT_CACHE@4"]=r)),e.exports=s});function Qb(i){if(Array.isArray(i))return i}function Zb(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r=[],s=!0,n=!1,a,o;try{for(t=t.call(i);!(s=(a=t.next()).done)&&(r.push(a.value),!(e&&r.length===e));s=!0);}catch(l){n=!0,o=l}finally{try{!s&&t.return!=null&&t.return()}finally{if(n)throw o}}return r}}function Jb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{R as Gl,r as ft,j as H}from"./index-BFGhCX_U.js";import{u as Ib}from"./index-_J-F_Dnc.js";import{z as Vd}from"./request-info-DCIQLE6H.js";import{f as Rb,a as wb,I as Cb}from"./misc-BJtHv_Jh.js";import{a as Db,e as Mb,A as Pb,L as ja}from"./components-9EGYHTc_.js";import{L as Oh}from"./loading-Dk0n07O3.js";import{c as Ob}from"./user-AF5-S38o.js";import{u as Nb}from"./workshop-config-DJY2cXU_.js";var Fb=Object.create,$0=Object.defineProperty,Ub=Object.getOwnPropertyDescriptor,$b=Object.getOwnPropertyNames,Bb=Object.getPrototypeOf,Gb=Object.prototype.hasOwnProperty,B0=function(i,e){return function(){return i&&(e=i(i=0)),e}},xt=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}},Hb=function(i,e,t,r){if(e&&typeof e=="object"||typeof e=="function")for(var s=$b(e),n=0,a=s.length,o;n<a;n++)o=s[n],!Gb.call(i,o)&&o!==t&&$0(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(r=Ub(e,o))||r.enumerable});return i},Qt=function(i,e,t){return t=i!=null?Fb(Bb(i)):{},Hb(!i||!i.__esModule?$0(t,"default",{value:i,enumerable:!0}):t,i)},Li=xt(function(i,e){var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t={},e.exports=t});function hs(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):hs(i,e)}var fs=B0(function(){fs()});function Nh(i){"@swc/helpers - typeof";return i&&typeof Symbol<"u"&&i.constructor===Symbol?"symbol":typeof i}var Fh=B0(function(){}),G0=xt(function(i,e){var t=Array.prototype.slice;e.exports=r;function r(s,n){for(("length"in s)||(s=[s]),s=t.call(s);s.length;){var a=s.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(s=t.call(a.childNodes).concat(s))}}}),Wb=xt(function(i,e){fs(),e.exports=t;function t(r,s){if(!hs(this,t))return new t(r,s);this.data=r,this.nodeValue=r,this.length=r.length,this.ownerDocument=s||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),Kb=xt(function(i,e){fs(),e.exports=t;function t(r,s){if(!hs(this,t))return new t(r);this.data=r||"",this.length=this.data.length,this.ownerDocument=s||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(r,s,n){var a=this.data,o=a.substring(0,r),l=a.substring(r+s,a.length);this.data=o+n+l,this.length=this.data.length}}),H0=xt(function(i,e){e.exports=t;function t(r){var s=this,n=r.type;r.target||(r.target=s),s.listeners||(s.listeners={});var a=s.listeners[n];if(a)return a.forEach(function(o){r.currentTarget=s,typeof o=="function"?o(r):o.handleEvent(r)});s.parentNode&&s.parentNode.dispatchEvent(r)}}),W0=xt(function(i,e){e.exports=t;function t(r,s){var n=this;n.listeners||(n.listeners={}),n.listeners[r]||(n.listeners[r]=[]),n.listeners[r].indexOf(s)===-1&&n.listeners[r].push(s)}}),K0=xt(function(i,e){e.exports=t;function t(r,s){var n=this;if(n.listeners&&n.listeners[r]){var a=n.listeners[r],o=a.indexOf(s);o!==-1&&a.splice(o,1)}}}),Vb=xt(function(i,e){Fh(),e.exports=r;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function r(h){switch(h.nodeType){case 3:return u(h.data);case 8:return"<!--"+h.data+"-->";default:return s(h)}}function s(h){var f=[],m=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(m=m.toLowerCase()),f.push("<"+m+d(h)+o(h)),t.indexOf(m)>-1?f.push(" />"):(f.push(">"),h.childNodes.length?f.push.apply(f,h.childNodes.map(r)):h.textContent||h.innerText?f.push(u(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=Nh(h[f]);return f==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(f)&&(m==="string"||m==="boolean"||m==="number")&&f!=="nodeName"&&f!=="className"&&f!=="tagName"&&f!=="textContent"&&f!=="innerText"&&f!=="namespaceURI"&&f!=="innerHTML"}function a(h){if(typeof h=="string")return h;var f="";return Object.keys(h).forEach(function(m){var p=h[m];m=m.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}),f+=m+":"+p+";"}),f}function o(h){var f=h.dataset,m=[];for(var p in f)m.push({name:"data-"+p,value:f[p]});return m.length?l(m):""}function l(h){var f=[];return h.forEach(function(m){var p=m.name,g=m.value;p==="style"&&(g=a(g)),f.push(p+'="'+c(g)+'"')}),f.length?" "+f.join(" "):""}function d(h){var f=[];for(var m in h)n(h,m)&&f.push({name:m,value:h[m]});for(var p in h._attributes)for(var g in h._attributes[p]){var E=h._attributes[p][g],y=(E.prefix?E.prefix+":":"")+g;f.push({name:y,value:E.value})}return h.className&&f.push({name:"class",value:h.className}),f.length?l(f):""}function u(h){var f="";return typeof h=="string"?f=h:h&&(f=h.toString()),f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function c(h){return u(h).replace(/"/g,"&quot;")}}),V0=xt(function(i,e){fs();var t=G0(),r=H0(),s=W0(),n=K0(),a=Vb(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,u,c){if(!hs(this,l))return new l(d);var h=c===void 0?o:c||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=u||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=this.childNodes.indexOf(u);return u.parentNode=null,this.childNodes[c]=d,d.parentNode=this,u},l.prototype.removeChild=function(d){var u=this.childNodes.indexOf(d);return this.childNodes.splice(u,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=u==null?-1:this.childNodes.indexOf(u);return c>-1?this.childNodes.splice(c,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,u,c){var h=null,f=u,m=u.indexOf(":");if(m>-1&&(h=u.substr(0,m),f=u.substr(m+1)),this.tagName==="INPUT"&&u==="type")this.type=c;else{var p=this._attributes[d]||(this._attributes[d]={});p[f]={value:c,prefix:h}}},l.prototype.getAttributeNS=function(d,u){var c=this._attributes[d],h=c&&c[u]&&c[u].value;return this.tagName==="INPUT"&&u==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,u){var c=this._attributes[d];c&&delete c[u]},l.prototype.hasAttributeNS=function(d,u){var c=this._attributes[d];return!!c&&u in c},l.prototype.setAttribute=function(d,u){return this.setAttributeNS(null,d,u)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=n,l.prototype.addEventListener=s,l.prototype.dispatchEvent=r,l.prototype.focus=function(){},l.prototype.toString=function(){return a(this)},l.prototype.getElementsByClassName=function(d){var u=d.split(" "),c=[];return t(this,function(h){if(h.nodeType===1){var f=h.className||"",m=f.split(" ");u.every(function(p){return m.indexOf(p)!==-1})&&c.push(h)}}),c},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var u=[];return t(this.childNodes,function(c){c.nodeType===1&&(d==="*"||c.tagName.toLowerCase()===d)&&u.push(c)}),u},l.prototype.contains=function(d){return t(this,function(u){return d===u})||!1}}),qb=xt(function(i,e){fs();var t=V0();e.exports=r;function r(s){if(!hs(this,r))return new r;this.childNodes=[],this.parentNode=null,this.ownerDocument=s||null}r.prototype.type="DocumentFragment",r.prototype.nodeType=11,r.prototype.nodeName="#document-fragment",r.prototype.appendChild=t.prototype.appendChild,r.prototype.replaceChild=t.prototype.replaceChild,r.prototype.removeChild=t.prototype.removeChild,r.prototype.toString=function(){return this.childNodes.map(function(s){return String(s)}).join("")}}),Yb=xt(function(i,e){e.exports=t;function t(r){}t.prototype.initEvent=function(r,s,n){this.type=r,this.bubbles=s,this.cancelable=n},t.prototype.preventDefault=function(){}}),jb=xt(function(i,e){fs();var t=G0(),r=Wb(),s=Kb(),n=V0(),a=qb(),o=Yb(),l=H0(),d=W0(),u=K0();e.exports=c;function c(){if(!hs(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var h=c.prototype;h.createTextNode=function(f){return new s(f,this)},h.createElementNS=function(f,m){var p=f===null?null:String(f);return new n(m,this,p)},h.createElement=function(f){return new n(f,this)},h.createDocumentFragment=function(){return new a(this)},h.createEvent=function(f){return new o(f)},h.createComment=function(f){return new r(f,this)},h.getElementById=function(f){f=String(f);var m=t(this.childNodes,function(p){if(String(p.id)===f)return p});return m||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),zb=xt(function(i,e){var t=jb();e.exports=new t}),Xb=xt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},r=zb(),s;typeof document<"u"?s=document:(s=t["__GLOBAL_DOCUMENT_CACHE@4"],s||(s=t["__GLOBAL_DOCUMENT_CACHE@4"]=r)),e.exports=s});function Qb(i){if(Array.isArray(i))return i}function Zb(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var r=[],s=!0,n=!1,a,o;try{for(t=t.call(i);!(s=(a=t.next()).done)&&(r.push(a.value),!(e&&r.length===e));s=!0);}catch(l){n=!0,o=l}finally{try{!s&&t.return!=null&&t.return()}finally{if(n)throw o}}return r}}function Jb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bu(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=i[t];return r}function q0(i,e){if(i){if(typeof i=="string")return Bu(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Bu(i,e)}}function Wi(i,e){return Qb(i)||Zb(i,e)||q0(i,e)||Jb()}var pa=Qt(Li()),xa=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var e=Math.random()*16|0,t=i==="x"?e:e&3|8;return t.toString(16)})},Y0=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},xr=function(i){if(i&&typeof i.nodeName<"u")return i.muxId||(i.muxId=Y0()),i.muxId;var e;try{e=document.querySelector(i)}catch{}return e&&!e.muxId&&(e.muxId=i),(e==null?void 0:e.muxId)||i},Gu=function(i){var e;i&&typeof i.nodeName<"u"?(e=i,i=xr(e)):e=document.querySelector(i);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,i,t]};function eT(i){if(Array.isArray(i))return Bu(i)}function tT(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function iT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zt(i){return eT(i)||tT(i)||q0(i)||iT()}var Yr={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},rT=function(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t,r,s,n,a,o=[console,i],l=(t=console.trace).bind.apply(t,Zt(o)),d=(r=console.info).bind.apply(r,Zt(o)),u=(s=console.debug).bind.apply(s,Zt(o)),c=(n=console.warn).bind.apply(n,Zt(o)),h=(a=console.error).bind.apply(a,Zt(o)),f=e;return{trace:function(){for(var m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];if(!(f>Yr.TRACE))return l.apply(void 0,Zt(p))},debug:function(){for(var m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];if(!(f>Yr.DEBUG))return u.apply(void 0,Zt(p))},info:function(){for(var m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];if(!(f>Yr.INFO))return d.apply(void 0,Zt(p))},warn:function(){for(var m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];if(!(f>Yr.WARN))return c.apply(void 0,Zt(p))},error:function(){for(var m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];if(!(f>Yr.ERROR))return h.apply(void 0,Zt(p))},get level(){return f},set level(m){m!==this.level&&(f=m??e)}}},Pe=rT("[mux]"),qd=Qt(Li());function Hu(){var i=qd.default.doNotTrack||qd.default.navigator&&qd.default.navigator.doNotTrack;return i==="1"}var sT=Qt(Li()),nT={now:function(){var i=sT.default.performance,e=i&&i.timing,t=e&&e.navigationStart,r=typeof t=="number"&&typeof i.now=="function"?t+i.now():Date.now();return Math.round(r)}},Xe=nT;function se(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}fs();function ut(i,e){if(!hs(i,e))throw new TypeError("Cannot call a class as a function")}function aT(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,r.key,r)}}function Ii(i,e,t){return e&&aT(i.prototype,e),i}function B(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Wu(i,e){return Wu=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},Wu(i,e)}function oT(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&Wu(i,e)}function Hl(i){return Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hl(i)}function lT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}Fh();function dT(i,e){return e&&(Nh(e)==="object"||typeof e=="function")?e:se(i)}function uT(i){var e=lT();return function(){var t=Hl(i),r;if(e){var s=Hl(this).constructor;r=Reflect.construct(t,arguments,s)}else r=t.apply(this,arguments);return dT(this,r)}}var qt=function(i){return ka(i)[0]},ka=function(i){if(typeof i!="string"||i==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t=i.match(e)||[],r=t[4],s;return r&&(s=(r.match(/[^\.]+\.[^\.]+$/)||[])[0]),[r,s]},Yd=Qt(Li()),cT={exists:function(){var i=Yd.default.performance,e=i&&i.timing;return e!==void 0},domContentLoadedEventEnd:function(){var i=Yd.default.performance,e=i&&i.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var i=Yd.default.performance,e=i&&i.timing;return e&&e.navigationStart}},Wl=cT;function He(i,e,t){t=t===void 0?1:t,i[e]=i[e]||0,i[e]+=t}function Kl(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),r.forEach(function(s){B(i,s,t[s])})}return i}function hT(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);t.push.apply(t,r)}return t}function Uh(i,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):hT(Object(e)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}),i}var fT=["x-cdn","content-type"],j0=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],mT=fT.concat(j0);function $h(i){i=i||"";var e={},t=i.trim().split(/[\r\n]+/);return t.forEach(function(r){if(r){var s=r.split(": "),n=s.shift();n&&(mT.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=s.join(": "))}}),e}function Vl(i){if(i){var e=j0.find(function(t){return i[t]!==void 0});return e?i[e]:void 0}}var pT=function(i){var e={};for(var t in i){var r=i[t],s=r["DATA-ID"].search("io.litix.data.");if(s!==-1){var n=r["DATA-ID"].replace("io.litix.data.","");e[n]=r.VALUE}}return e},z0=pT,za=function(i){if(!i)return{};var e=Wl.navigationStart(),t=i.loading,r=t?t.start:i.trequest,s=t?t.first:i.tfirst,n=t?t.end:i.tload;return{bytesLoaded:i.total,requestStart:Math.round(e+r),responseStart:Math.round(e+s),responseEnd:Math.round(e+n)}},kn=function(i){if(!(!i||typeof i.getAllResponseHeaders!="function"))return $h(i.getAllResponseHeaders())},gT=function(i,e,t){var r=arguments.length>4?arguments[4]:void 0,s=i.log,n=i.utils.secondsToMs,a=function(g){var E=parseInt(r.version),y;return E===1&&g.programDateTime!==null&&(y=g.programDateTime),E===0&&g.pdt!==null&&(y=g.pdt),y};if(!Wl.exists()){s.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(g,E){return i.emit(e,g,E)},l=function(g,E){var y=E.levels,b=E.audioTracks,S=E.url,_=E.stats,x=E.networkDetails,A=E.sessionData,C={},O={};y.forEach(function(V,q){C[q]={width:V.width,height:V.height,bitrate:V.bitrate,attrs:V.attrs}}),b.forEach(function(V,q){O[q]={name:V.name,language:V.lang,bitrate:V.bitrate}});var L=za(_),M=L.bytesLoaded,K=L.requestStart,U=L.responseStart,z=L.responseEnd;o("requestcompleted",Uh(Kl({},z0(A)),{request_event_type:g,request_bytes_loaded:M,request_start:K,request_response_start:U,request_response_end:z,request_type:"manifest",request_hostname:qt(S),request_response_headers:kn(x),request_rendition_lists:{media:C,audio:O,video:{}}}))};t.on(r.Events.MANIFEST_LOADED,l);var d=function(g,E){var y=E.details,b=E.level,S=E.networkDetails,_=E.stats,x=za(_),A=x.bytesLoaded,C=x.requestStart,O=x.responseStart,L=x.responseEnd,M=y.fragments[y.fragments.length-1],K=a(M)+n(M.duration);o("requestcompleted",{request_event_type:g,request_bytes_loaded:A,request_start:C,request_response_start:O,request_response_end:L,request_current_level:b,request_type:"manifest",request_hostname:qt(y.url),request_response_headers:kn(S),video_holdback:y.holdBack&&n(y.holdBack),video_part_holdback:y.partHoldBack&&n(y.partHoldBack),video_part_target_duration:y.partTarget&&n(y.partTarget),video_target_duration:y.targetduration&&n(y.targetduration),video_source_is_live:y.live,player_manifest_newest_program_time:isNaN(K)?void 0:K})};t.on(r.Events.LEVEL_LOADED,d);var u=function(g,E){var y=E.details,b=E.networkDetails,S=E.stats,_=za(S),x=_.bytesLoaded,A=_.requestStart,C=_.responseStart,O=_.responseEnd;o("requestcompleted",{request_event_type:g,request_bytes_loaded:x,request_start:A,request_response_start:C,request_response_end:O,request_type:"manifest",request_hostname:qt(y.url),request_response_headers:kn(b)})};t.on(r.Events.AUDIO_TRACK_LOADED,u);var c=function(g,E){var y=E.stats,b=E.networkDetails,S=E.frag;y=y||S.stats;var _=za(y),x=_.bytesLoaded,A=_.requestStart,C=_.responseStart,O=_.responseEnd,L=b?kn(b):void 0,M={request_event_type:g,request_bytes_loaded:x,request_start:A,request_response_start:C,request_response_end:O,request_hostname:b?qt(b.responseURL):void 0,request_id:L?Vl(L):void 0,request_response_headers:L,request_media_duration:S.duration,request_url:b==null?void 0:b.responseURL};S.type==="main"?(M.request_type="media",M.request_current_level=S.level,M.request_video_width=(t.levels[S.level]||{}).width,M.request_video_height=(t.levels[S.level]||{}).height,M.request_labeled_bitrate=(t.levels[S.level]||{}).bitrate):M.request_type=S.type,o("requestcompleted",M)};t.on(r.Events.FRAG_LOADED,c);var h=function(g,E){var y=E.frag,b=y.start,S=a(y),_={currentFragmentPDT:S,currentFragmentStart:n(b)};o("fragmentchange",_)};t.on(r.Events.FRAG_CHANGED,h);var f=function(g,E){var y=E.type,b=E.details,S=E.response,_=E.fatal,x=E.frag,A=E.networkDetails,C=(x==null?void 0:x.url)||E.url||"",O=A?kn(A):void 0;if((b===r.ErrorDetails.MANIFEST_LOAD_ERROR||b===r.ErrorDetails.MANIFEST_LOAD_TIMEOUT||b===r.ErrorDetails.FRAG_LOAD_ERROR||b===r.ErrorDetails.FRAG_LOAD_TIMEOUT||b===r.ErrorDetails.LEVEL_LOAD_ERROR||b===r.ErrorDetails.LEVEL_LOAD_TIMEOUT||b===r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||b===r.ErrorDetails.SUBTITLE_LOAD_ERROR||b===r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||b===r.ErrorDetails.KEY_LOAD_ERROR||b===r.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:b,request_url:C,request_hostname:qt(C),request_id:O?Vl(O):void 0,request_type:b===r.ErrorDetails.FRAG_LOAD_ERROR||b===r.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":b===r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":b===r.ErrorDetails.SUBTITLE_LOAD_ERROR||b===r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":b===r.ErrorDetails.KEY_LOAD_ERROR||b===r.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:S==null?void 0:S.code,request_error_text:S==null?void 0:S.text}),_){var L,M="".concat(C?"url: ".concat(C,`
4
4
  `):"")+"".concat(S&&(S.code||S.text)?"response: ".concat(S.code,", ").concat(S.text,`
@@ -3050,4 +3050,4 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3050
3050
  </template>
3051
3051
  `,kh=gr.createElement("template");"innerHTML"in kh&&(kh.innerHTML=HC);var L0,I0,pb=class extends Hd{};pb.template=(I0=(L0=kh.content)==null?void 0:L0.children)==null?void 0:I0[0];lt.customElements.get("media-theme-gerwig")||lt.customElements.define("media-theme-gerwig",pb);var WC="gerwig",Oi={SRC:"src",POSTER:"poster"},F={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips"},Lh=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function KC(i,e){var t;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src||!!i.currentSrc,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute(F.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:VC(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(F.NOHOTKEYS),hotKeys:i.getAttribute(F.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableTracking:i.disableTracking,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,minResolution:i.minResolution,programStartTime:i.programStartTime,programEndTime:i.programEndTime,renditionOrder:i.renditionOrder,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(P.TARGET_LIVE_WINDOW),streamType:Qf(i.getAttribute(P.STREAM_TYPE)),primaryColor:i.getAttribute(F.PRIMARY_COLOR),secondaryColor:i.getAttribute(F.SECONDARY_COLOR),accentColor:i.getAttribute(F.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:qC(i),playbackRates:i.getAttribute(F.PLAYBACK_RATES),customDomain:(t=i.getAttribute(P.CUSTOM_DOMAIN))!=null?t:void 0,title:i.getAttribute(F.TITLE),novolumepref:i.hasAttribute(F.NO_VOLUME_PREF),castReceiver:i.castReceiver,...e,extraSourceParams:i.extraSourceParams}}function VC(i){var e,t;let r=i.theme;if(r){let s=(t=(e=i.getRootNode())==null?void 0:e.getElementById)==null?void 0:t.call(e,r);if(s&&s instanceof HTMLTemplateElement)return s;r.startsWith("media-theme-")||(r=`media-theme-${r}`);let n=lt.customElements.get(r);if(n!=null&&n.template)return n.template}}function qC(i){var e;let t=(e=i.mediaController)==null?void 0:e.querySelector("media-time-display");return t&&getComputedStyle(t).getPropertyValue("--media-duration-display-display").trim()==="none"}function R0(i){let e=i.hasAttribute(F.TITLE)?{video_title:i.getAttribute(F.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,r)=>{let s=i.getAttribute(r);return s!==null&&(t[r.replace(/^metadata-/,"").replace(/-/g,"_")]=s),t},e)}var YC=Object.values(P),jC=Object.values(Oi),zC=Object.values(F),XC=nb(),QC="mux-player",w0={dialog:void 0,isDialogOpen:!1},ZC={redundant_streams:!0},Ul,$l,Vr,Bl,hn,Ni,sr,Ih,gb,kd,Rh,lr,qr,wh,C0,Ch,D0,Dh,M0,Mh,P0,O0=class extends A0{constructor(){super(),st(this,Ni),st(this,Ih),st(this,kd),st(this,lr),st(this,wh),st(this,Ch),st(this,Dh),st(this,Mh),st(this,Ul,!1),st(this,$l,{}),st(this,Vr,!0),st(this,Bl,new EC(this,"hotkeys")),st(this,hn,{...w0,onCloseErrorDialog:()=>Ge(this,kd,Rh).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{rb(this,gr.activeElement)||e.preventDefault()}}),this.attachShadow({mode:"open"}),Ge(this,Ih,gb).call(this),this.isConnected&&Ge(this,Ni,sr).call(this)}static get observedAttributes(){var e;return[...(e=A0.observedAttributes)!=null?e:[],...jC,...YC,...zC]}get mediaTheme(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("media-theme")}get mediaController(){var e,t;return(t=(e=this.mediaTheme)==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("media-controller")}connectedCallback(){var e;let t=(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video");t&&(t.metadata=R0(this))}attributeChangedCallback(e,t,r){switch(Ge(this,Ni,sr).call(this),super.attributeChangedCallback(e,t,r),e){case F.HOTKEYS:ve(this,Bl).value=r;break;case F.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&Bi(ce("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case F.THUMBNAIL_TOKEN:{if(r){let{aud:s}=un(r);s!=="t"&&Bi(ce("The provided thumbnail-token should have audience value 'd' instead of '{aud}'.").format({aud:s}))}break}case F.STORYBOARD_TOKEN:{if(r){let{aud:s}=un(r);s!=="s"&&Bi(ce("The provided storyboard-token should have audience value 'd' instead of '{aud}'.").format({aud:s}))}break}case F.DRM_TOKEN:{if(r){let{aud:s}=un(r);s!=="d"&&Bi(ce("The provided drm-token should have audience value 'd' instead of '{aud}'.").format({aud:s}))}break}case P.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ft(ce("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case P.STREAM_TYPE:r&&![be.LIVE,be.ON_DEMAND,be.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:ob({file:"invalid-stream-type.md",message:ce("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===be.LIVE?this.getAttribute(F.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[P.PLAYBACK_ID,Oi.SRC,F.PLAYBACK_TOKEN].includes(e)&&t!==r&&Hi(this,hn,{...ve(this,hn),...w0}),Ge(this,lr,qr).call(this,{[vC(e)]:r})}get preferCmcd(){var e;return(e=this.getAttribute(P.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?rd.includes(e)?this.setAttribute(P.PREFER_CMCD,e):Bi(`Invalid value for preferCmcd. Must be one of ${rd.join()}`):this.removeAttribute(P.PREFER_CMCD))}get hasPlayed(){var e,t;return(t=(e=this.mediaController)==null?void 0:e.hasAttribute(T.MEDIA_HAS_PLAYED))!=null?t:!1}get inLiveWindow(){var e;return(e=this.mediaController)==null?void 0:e.hasAttribute(T.MEDIA_TIME_IS_LIVE)}get _hls(){var e;return(e=this.media)==null?void 0:e._hls}get mux(){var e;return(e=this.media)==null?void 0:e.mux}get theme(){var e;return(e=this.getAttribute(F.THEME))!=null?e:WC}set theme(e){this.setAttribute(F.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let r of e.getAttributeNames()){if(Lh.includes(r))continue;let s=e.getAttribute(r);t[tb(r)]=s===""?!0:s}return t}set themeProps(e){var t,r;Ge(this,Ni,sr).call(this);let s={...this.themeProps,...e};for(let n in s){if(Lh.includes(n))continue;let a=e==null?void 0:e[n];typeof a=="boolean"||a==null?(t=this.mediaTheme)==null||t.toggleAttribute(Ah(n),!!a):(r=this.mediaTheme)==null||r.setAttribute(Ah(n),a)}}get playbackId(){var e;return(e=this.getAttribute(P.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){e?this.setAttribute(P.PLAYBACK_ID,e):this.removeAttribute(P.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?(e=Sr(this,Oi.SRC))!=null?e:void 0:(t=this.getAttribute(Oi.SRC))!=null?t:void 0}set src(e){e?this.setAttribute(Oi.SRC,e):this.removeAttribute(Oi.SRC)}get poster(){var e;let t=this.getAttribute(Oi.POSTER);if(t!=null)return t;let{tokens:r}=this;if(r.playback&&!r.thumbnail){Bi("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return mC(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(e=this.thumbnailTime)!=null?e:this.startTime,programTime:this.programStartTime,token:r.thumbnail})}set poster(e){e||e===""?this.setAttribute(Oi.POSTER,e):this.removeAttribute(Oi.POSTER)}get storyboardSrc(){var e;return(e=this.getAttribute(F.STORYBOARD_SRC))!=null?e:void 0}set storyboardSrc(e){e?this.setAttribute(F.STORYBOARD_SRC,e):this.removeAttribute(F.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;if(this.storyboardSrc&&!e.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[be.LIVE,be.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard))return pC(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(F.AUDIO)}set audio(e){if(!e){this.removeAttribute(F.AUDIO);return}this.setAttribute(F.AUDIO,"")}get hotkeys(){return ve(this,Bl)}get nohotkeys(){return this.hasAttribute(F.NOHOTKEYS)}set nohotkeys(e){if(!e){this.removeAttribute(F.NOHOTKEYS);return}this.setAttribute(F.NOHOTKEYS,"")}get thumbnailTime(){return pi(this.getAttribute(F.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(F.THUMBNAIL_TIME,`${e}`)}get title(){var e;return(e=this.getAttribute(F.TITLE))!=null?e:""}set title(e){e!==this.title&&(e?this.setAttribute(F.TITLE,e):this.removeAttribute("title"),super.title=e)}get placeholder(){var e;return(e=Sr(this,F.PLACEHOLDER))!=null?e:""}set placeholder(e){this.setAttribute(F.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let r=this.getAttribute(F.PRIMARY_COLOR);if(r!=null||this.mediaTheme&&(r=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_primary-color"))==null?void 0:t.trim(),r))return r}set primaryColor(e){this.setAttribute(F.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let r=this.getAttribute(F.SECONDARY_COLOR);if(r!=null||this.mediaTheme&&(r=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_secondary-color"))==null?void 0:t.trim(),r))return r}set secondaryColor(e){this.setAttribute(F.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let r=this.getAttribute(F.ACCENT_COLOR);if(r!=null||this.mediaTheme&&(r=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_accent-color"))==null?void 0:t.trim(),r))return r}set accentColor(e){this.setAttribute(F.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(F.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(F.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(F.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(F.PLAYBACK_RATES))return this.getAttribute(F.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>e-t)}set playbackRates(e){if(!e){this.removeAttribute(F.PLAYBACK_RATES);return}this.setAttribute(F.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return(e=pi(this.getAttribute(F.FORWARD_SEEK_OFFSET)))!=null?e:10}set forwardSeekOffset(e){this.setAttribute(F.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return(e=pi(this.getAttribute(F.BACKWARD_SEEK_OFFSET)))!=null?e:10}set backwardSeekOffset(e){this.setAttribute(F.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(F.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(F.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(F.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return pi(this.getAttribute(F.DEFAULT_DURATION))}set defaultDuration(e){e==null?this.removeAttribute(F.DEFAULT_DURATION):this.setAttribute(F.DEFAULT_DURATION,`${e}`)}get playerSoftwareName(){var e;return(e=this.getAttribute(P.PLAYER_SOFTWARE_NAME))!=null?e:QC}get playerSoftwareVersion(){var e;return(e=this.getAttribute(P.PLAYER_SOFTWARE_VERSION))!=null?e:XC}get beaconCollectionDomain(){var e;return(e=this.getAttribute(P.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(P.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(P.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return(e=this.getAttribute(P.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(P.MAX_RESOLUTION,e):this.removeAttribute(P.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(P.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(P.MIN_RESOLUTION,e):this.removeAttribute(P.MIN_RESOLUTION))}get renditionOrder(){var e;return(e=this.getAttribute(P.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(P.RENDITION_ORDER,e):this.removeAttribute(P.RENDITION_ORDER))}get programStartTime(){return pi(this.getAttribute(P.PROGRAM_START_TIME))}set programStartTime(e){e==null?this.removeAttribute(P.PROGRAM_START_TIME):this.setAttribute(P.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return pi(this.getAttribute(P.PROGRAM_END_TIME))}set programEndTime(e){e==null?this.removeAttribute(P.PROGRAM_END_TIME):this.setAttribute(P.PROGRAM_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(F.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(F.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,r])=>(e[t]=r,e),{}):ZC}set extraSourceParams(e){e==null?this.removeAttribute(F.EXTRA_SOURCE_PARAMS):this.setAttribute(F.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return(e=this.getAttribute(P.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(P.CUSTOM_DOMAIN,e):this.removeAttribute(P.CUSTOM_DOMAIN))}get envKey(){var e;return(e=Sr(this,P.ENV_KEY))!=null?e:void 0}set envKey(e){this.setAttribute(P.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(F.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(F.NO_VOLUME_PREF,""):this.removeAttribute(F.NO_VOLUME_PREF)}get debug(){return Sr(this,P.DEBUG)!=null}set debug(e){e?this.setAttribute(P.DEBUG,""):this.removeAttribute(P.DEBUG)}get disableTracking(){return Sr(this,P.DISABLE_TRACKING)!=null}set disableTracking(e){this.toggleAttribute(P.DISABLE_TRACKING,!!e)}get disableCookies(){return Sr(this,P.DISABLE_COOKIES)!=null}set disableCookies(e){e?this.setAttribute(P.DISABLE_COOKIES,""):this.removeAttribute(P.DISABLE_COOKIES)}get streamType(){var e,t,r;return(r=(t=this.getAttribute(P.STREAM_TYPE))!=null?t:(e=this.media)==null?void 0:e.streamType)!=null?r:be.UNKNOWN}set streamType(e){this.setAttribute(P.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,r;return(r=(t=this.getAttribute(F.DEFAULT_STREAM_TYPE))!=null?t:(e=this.mediaController)==null?void 0:e.getAttribute(F.DEFAULT_STREAM_TYPE))!=null?r:be.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(F.DEFAULT_STREAM_TYPE,e):this.removeAttribute(F.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(F.TARGET_LIVE_WINDOW)?+this.getAttribute(F.TARGET_LIVE_WINDOW):(t=(e=this.media)==null?void 0:e.targetLiveWindow)!=null?t:Number.NaN}set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(e==null?this.removeAttribute(F.TARGET_LIVE_WINDOW):this.setAttribute(F.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return(e=this.media)==null?void 0:e.liveEdgeStart}get startTime(){return pi(Sr(this,P.START_TIME))}set startTime(e){this.setAttribute(P.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(P.PREFER_PLAYBACK);if(e===Ti.MSE||e===Ti.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Ti.MSE||e===Ti.NATIVE?this.setAttribute(P.PREFER_PLAYBACK,e):this.removeAttribute(P.PREFER_PLAYBACK))}get metadata(){var e;return(e=this.media)==null?void 0:e.metadata}set metadata(e){if(Ge(this,Ni,sr).call(this),!this.media){Ft("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...R0(this),...e}}get _hlsConfig(){var e;return(e=this.media)==null?void 0:e._hlsConfig}set _hlsConfig(e){if(Ge(this,Ni,sr).call(this),!this.media){Ft("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=e}async addCuePoints(e){var t;if(Ge(this,Ni,sr).call(this),!this.media){Ft("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(t=this.media)==null?void 0:t.addCuePoints(e)}get activeCuePoint(){var e;return(e=this.media)==null?void 0:e.activeCuePoint}get cuePoints(){var e,t;return(t=(e=this.media)==null?void 0:e.cuePoints)!=null?t:[]}addChapters(e){var t;if(Ge(this,Ni,sr).call(this),!this.media){Ft("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(t=this.media)==null?void 0:t.addChapters(e)}get activeChapter(){var e;return(e=this.media)==null?void 0:e.activeChapter}get chapters(){var e,t;return(t=(e=this.media)==null?void 0:e.chapters)!=null?t:[]}getStartDate(){var e;return(e=this.media)==null?void 0:e.getStartDate()}get currentPdt(){var e;return(e=this.media)==null?void 0:e.currentPdt}get tokens(){let e=this.getAttribute(F.PLAYBACK_TOKEN),t=this.getAttribute(F.DRM_TOKEN),r=this.getAttribute(F.THUMBNAIL_TOKEN),s=this.getAttribute(F.STORYBOARD_TOKEN);return{...ve(this,$l),...e!=null?{playback:e}:{},...t!=null?{drm:t}:{},...r!=null?{thumbnail:r}:{},...s!=null?{storyboard:s}:{}}}set tokens(e){Hi(this,$l,e??{})}get playbackToken(){var e;return(e=this.getAttribute(F.PLAYBACK_TOKEN))!=null?e:void 0}set playbackToken(e){this.setAttribute(F.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return(e=this.getAttribute(F.DRM_TOKEN))!=null?e:void 0}set drmToken(e){this.setAttribute(F.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return(e=this.getAttribute(F.THUMBNAIL_TOKEN))!=null?e:void 0}set thumbnailToken(e){this.setAttribute(F.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return(e=this.getAttribute(F.STORYBOARD_TOKEN))!=null?e:void 0}set storyboardToken(e){this.setAttribute(F.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,r,s){var n;let a=(n=this.media)==null?void 0:n.nativeEl;if(a)return of(a,e,t,r,s)}removeTextTrack(e){var t;let r=(t=this.media)==null?void 0:t.nativeEl;if(r)return Lk(r,e)}get textTracks(){var e;return(e=this.media)==null?void 0:e.textTracks}get castReceiver(){var e;return(e=this.getAttribute(F.CAST_RECEIVER))!=null?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(F.CAST_RECEIVER,e):this.removeAttribute(F.CAST_RECEIVER))}get castCustomData(){var e;return(e=this.media)==null?void 0:e.castCustomData}set castCustomData(e){if(!this.media){Ft("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=e}get noTooltips(){return this.hasAttribute(F.NO_TOOLTIPS)}set noTooltips(e){if(!e){this.removeAttribute(F.NO_TOOLTIPS);return}this.setAttribute(F.NO_TOOLTIPS,"")}};Ul=new WeakMap,$l=new WeakMap,Vr=new WeakMap,Bl=new WeakMap,hn=new WeakMap,Ni=new WeakSet,sr=function(){var i,e,t,r;if(!ve(this,Ul)){Hi(this,Ul,!0),Ge(this,lr,qr).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof lt.HTMLElement))throw""}catch{Ft("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof yw))throw""}catch{Ft("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof lI))throw""}catch{Ft("<media-controller> failed to upgrade!")}this.init(),Ge(this,wh,C0).call(this),Ge(this,Ch,D0).call(this),Ge(this,Dh,M0).call(this),Hi(this,Vr,(e=(i=this.mediaController)==null?void 0:i.hasAttribute(me.USER_INACTIVE))!=null?e:!0),Ge(this,Mh,P0).call(this),(t=this.media)==null||t.addEventListener("streamtypechange",()=>Ge(this,lr,qr).call(this)),(r=this.media)==null||r.addEventListener("loadstart",()=>Ge(this,lr,qr).call(this))}},Ih=new WeakSet,gb=function(){var i,e;try{(i=window==null?void 0:window.CSS)==null||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window==null?void 0:window.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},kd=new WeakSet,Rh=function(i){Object.assign(ve(this,hn),i),Ge(this,lr,qr).call(this)},lr=new WeakSet,qr=function(i={}){OC(FC(KC(this,{...ve(this,hn),...i})),this.shadowRoot)},wh=new WeakSet,C0=function(){let i=e=>{var t,r;if(!(e!=null&&e.startsWith("theme-")))return;let s=e.replace(/^theme-/,"");if(Lh.includes(s))return;let n=this.getAttribute(e);n!=null?(t=this.mediaTheme)==null||t.setAttribute(s,n):(r=this.mediaTheme)==null||r.removeAttribute(s)};new MutationObserver(e=>{for(let{attributeName:t}of e)i(t)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},Ch=new WeakSet,D0=function(){var i;let e=t=>{let{detail:r}=t;if(r instanceof St||(r=new St(r.message,r.code,r.fatal)),!(r!=null&&r.fatal)){Bi(r),r.data&&Bi(`${r.name} data:`,r.data);return}let{dialog:s,devlog:n}=xh(r,!window.navigator.onLine,this.playbackId,this.playbackToken);n.message&&ob(n),Ft(r),r.data&&Ft(`${r.name} data:`,r.data),Ge(this,kd,Rh).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(t={})=>{var r,s,n;if(!(((r=this.media)==null?void 0:r.error)instanceof St))return t;let{devlog:a}=xh((s=this.media)==null?void 0:s.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(n=this.media)==null?void 0:n.error.code,player_error_message:a.message?String(a.message):t.player_error_message,player_error_context:a.context?String(a.context):t.player_error_context}}),(i=this.media)==null||i.addEventListener("error",t=>{var r,s;let{detail:n}=t;if(!n){let{message:a,code:o}=(s=(r=this.media)==null?void 0:r.error)!=null?s:{};n=new St(a,o)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Dh=new WeakSet,M0=function(){var i,e,t,r;let s=()=>Ge(this,lr,qr).call(this);(e=(i=this.media)==null?void 0:i.textTracks)==null||e.addEventListener("addtrack",s),(r=(t=this.media)==null?void 0:t.textTracks)==null||r.addEventListener("removetrack",s)},Mh=new WeakSet,P0=function(){var i,e;if(!/Firefox/i.test(navigator.userAgent))return;let t,r=new WeakMap,s=()=>this.streamType===be.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,u=!1)=>{s()||Array.from(l&&l.activeCues||[]).forEach(c=>{if(!(!c.snapToLines||c.line<-5||c.line>=0&&c.line<10))if(!d||this.paused){let h=c.text.split(`
3052
3052
  `).length,f=-3;this.streamType===be.LIVE&&(f=-2);let m=f-h;if(c.line===m&&!u)return;r.has(c)||r.set(c,c.line),c.line=m}else setTimeout(()=>{c.line=r.get(c)||"auto"},500)})},a=()=>{var l,d;n(t,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(me.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let u=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(c=>["subtitles","captions"].includes(c.kind)&&c.mode==="showing")[0];u!==t&&(t==null||t.removeEventListener("cuechange",a)),t=u,t==null||t.addEventListener("cuechange",a),n(t,ve(this,Vr))};o(),(i=this.textTracks)==null||i.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let u=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(me.USER_INACTIVE))!=null?d:!0;ve(this,Vr)!==u&&(Hi(this,Vr,u),n(t,ve(this,Vr)))})};function Sr(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}lt.customElements.get("mux-player")||(lt.customElements.define("mux-player",O0),lt.MuxPlayerElement=O0);var N0={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},JC=i=>i==null,eD=(i,e)=>JC(e)?!1:i in e,tD=i=>i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),iD=(i,e)=>{if(!(typeof e=="boolean"&&!e)){if(eD(i,N0))return N0[i];if(typeof e!=null)return/[A-Z]/.test(i)?tD(i):i}},rD=(i,e)=>typeof i=="boolean"?"":i,sD=(i={})=>Object.entries(i).reduce((e,[t,r])=>{let s=iD(t,r);if(!s)return e;let n=rD(r);return e[s]=n,e},{}),nD=(...i)=>{let e=ft.useRef(null);return ft.useEffect(()=>{i.forEach(t=>{t&&(typeof t=="function"?t(e.current):t.current=e.current)})},[i]),e},aD=Object.prototype.hasOwnProperty,oD=(i,e)=>{if(Object.is(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;if(Array.isArray(i))return!Array.isArray(e)||i.length!==e.length?!1:i.some((s,n)=>e[n]===s);let t=Object.keys(i),r=Object.keys(e);if(t.length!==r.length)return!1;for(let s=0;s<t.length;s++)if(!aD.call(e,t[s])||!Object.is(i[t[s]],e[t[s]]))return!1;return!0},vb=(i,e,t)=>!oD(e,i[t]),lD=(i,e,t)=>{i[t]=e},dD=(i,e,t,r=lD,s=vb)=>ft.useEffect(()=>{let n=t==null?void 0:t.current;n&&s(n,e,i)&&r(n,e,i)},[t==null?void 0:t.current,e]),ii=dD,uD=()=>{try{return"3.0.0"}catch{}return"UNKNOWN"},cD=uD(),hD=()=>cD,fD=Gl.forwardRef(({children:i,...e},t)=>Gl.createElement("mux-player",sD({...e,ref:t}),i)),xe=(i,e,t)=>ft.useEffect(()=>{let r=e==null?void 0:e.current;if(!(!r||!t))return r.addEventListener(i,t),()=>{r.removeEventListener(i,t)}},[e==null?void 0:e.current,t]),mD=(i,e)=>{let{onAbort:t,onCanPlay:r,onCanPlayThrough:s,onEmptied:n,onLoadStart:a,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:f,onWaiting:m,onPlay:p,onPlaying:g,onTimeUpdate:E,onPause:y,onSeeking:b,onSeeked:S,onStalled:_,onSuspend:x,onEnded:A,onError:C,onCuePointChange:O,onCuePointsChange:L,onChapterChange:M,metadata:K,tokens:U,paused:z,playbackId:V,playbackRates:q,currentTime:ae,themeProps:ne,extraSourceParams:G,castCustomData:$,_hlsConfig:te,...re}=e;return ii("playbackRates",q,i),ii("metadata",K,i),ii("extraSourceParams",G,i),ii("_hlsConfig",te,i),ii("themeProps",ne,i),ii("tokens",U,i),ii("playbackId",V,i),ii("castCustomData",$,i),ii("paused",z,i,(oe,pe)=>{pe!=null&&(pe?oe.pause():oe.play())},(oe,pe,Re)=>oe.hasAttribute("autoplay")&&!oe.hasPlayed?!1:vb(oe,pe,Re)),ii("currentTime",ae,i,(oe,pe)=>{pe!=null&&(oe.currentTime=pe)}),xe("abort",i,t),xe("canplay",i,r),xe("canplaythrough",i,s),xe("emptied",i,n),xe("loadstart",i,a),xe("loadeddata",i,o),xe("loadedmetadata",i,l),xe("progress",i,d),xe("durationchange",i,u),xe("volumechange",i,c),xe("ratechange",i,h),xe("resize",i,f),xe("waiting",i,m),xe("play",i,p),xe("playing",i,g),xe("timeupdate",i,E),xe("pause",i,y),xe("seeking",i,b),xe("seeked",i,S),xe("stalled",i,_),xe("suspend",i,x),xe("ended",i,A),xe("error",i,C),xe("cuepointchange",i,O),xe("cuepointschange",i,L),xe("chapterchange",i,M),[re]},pD=hD(),gD="mux-player-react",vD=Gl.forwardRef((i,e)=>{let t=ft.useRef(null),r=nD(t,e),[s]=mD(t,i);return Gl.createElement(fD,{ref:r,playerSoftwareName:gD,playerSoftwareVersion:pD,...s})}),ED=vD;const yD=Vd.object({time:Vd.number(),expiresAt:Vd.string()}).transform(i=>({time:Number(i.time),expiresAt:new Date(i.expiresAt)}));function bD(){var e;const i=Mb("root");return((e=i==null?void 0:i.preferences)==null?void 0:e.player)??null}const TD=["INPUT","SELECT","BUTTON","TEXTAREA","MUX-PLAYER","SUMMARY"],_D=["button","option","combobox","tab","tablist"];function F0(i){let e=i;for(;e;){if(!(e instanceof HTMLElement))return!1;if(TD.includes(e.tagName)||_D.includes(e.getAttribute("role")||"")||e.isContentEditable)return!0;e=e.parentElement}return!1}function U0(i){const e=ft.useRef(i);return ft.useEffect(()=>{e.current=i},[i]),e}function AD({muxPlayerRef:i,...e}){const t=bD(),r=Db(),[s,n]=ft.useState(!1),a=`${e.playbackId}:currentTime`,[o,l]=ft.useState(0),d=U0(r),u=U0(t);ft.useEffect(()=>{if(typeof document>"u")return;const h=sessionStorage.getItem(a);if(h)try{const{time:f,expiresAt:m}=yD.parse(JSON.parse(h));if(m.getTime()<Date.now())throw new Error("Time expired");l(f)}catch{sessionStorage.removeItem(a)}},[a]),ft.useEffect(()=>{function h(f){if(!i.current)return;const m=document.activeElement;F0(m)||F0(f.target)||(f.key===" "&&(f.preventDefault(),i.current.paused?i.current.play():i.current.pause()),f.key==="ArrowRight"&&(f.preventDefault(),i.current.currentTime=i.current.currentTime+(i.current.forwardSeekOffset||10)),f.key==="ArrowLeft"&&(f.preventDefault(),i.current.currentTime=i.current.currentTime-(i.current.forwardSeekOffset||10)),f.key==="f"&&!f.metaKey&&!f.ctrlKey&&(f.preventDefault(),document.fullscreenElement?document.exitFullscreen():i.current.requestFullscreen()))}return window.document.addEventListener("keydown",h),()=>{window.document.removeEventListener("keydown",h)}},[i]);const c=Rb(()=>{const h=i.current;if(!h)return;const f=Array.from(h.textTracks??[]).find(p=>p.kind==="subtitles"),m={playbackRate:h.playbackRate,volumeRate:h.volume,subtitle:f?{id:f.id,mode:f.mode}:{id:null,mode:"disabled"}};Ph(m,u.current)||d.current.submit(m,{method:"POST",action:"/video-player",encType:"application/json"})},300);return ft.useEffect(()=>{var m,p;if(!s)return;const h=(m=i.current)==null?void 0:m.textTracks;if(!h)return;const f=(p=u.current)==null?void 0:p.subtitle;if(f!=null&&f.id){const g=h.getTrackById(f.id);g&&(g.mode=f.mode??"hidden")}return h.addEventListener("change",c),()=>{h.removeEventListener("change",c)}},[s,i,u,c]),H.jsx("div",{className:"flex aspect-video flex-col",children:H.jsx(ED,{ref:i,playbackRates:[.5,.75,1,1.25,1.5,1.75,2,2.5,3,3.5,4],volume:(t==null?void 0:t.volumeRate)??1,playbackRate:(t==null?void 0:t.playbackRate)??1,thumbnailTime:o,onRateChange:c,onVolumeChange:c,streamType:"on-demand",defaultHiddenCaptions:!0,currentTime:o,onTimeUpdate:()=>{var h;return sessionStorage.setItem(a,JSON.stringify({time:(h=i.current)==null?void 0:h.currentTime,expiresAt:new Date(Date.now()+1e3*60*30).toISOString()}))},accentColor:"#427cf0",targetLiveWindow:NaN,onLoadedMetadata:()=>n(!0),...e})})}function Ph(i,e){if(i===e)return!0;if(typeof i!=typeof e||typeof i!="object"||typeof e!="object"||i===null||e===null||Array.isArray(i)!==Array.isArray(e))return!1;if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(let s=0;s<i.length;s++)if(!Ph(i[s],e[s]))return!1;return!0}const t=Object.keys(i),r=Object.keys(e);if(t.length!==r.length)return!1;for(const s of t)if(!Ph(i[s],e[s]))return!1;return!0}const Eb=ft.createContext(null);function lM({children:i,epicVideoInfosPromise:e}){return H.jsx(Eb.Provider,{value:e,children:i})}function yb(i){let e=new URL("https://epicweb.dev");try{e=new URL(i)}catch(c){return console.error(c),"EpicWeb.dev Video"}const t=e.pathname.split("/").filter(Boolean),r=t.includes("solution");let s=t.pop();const n=["problem","solution","embed","exercise"],a=c=>c&&!n.includes(c);for(;!a(s);)s=t.pop();if(!s)return"EpicWeb.dev Video";const o=s.split("-"),l=["the","a","an","and","but","or","for","nor","on","at","to","from","by","of","in","with","as","npm","git","ssh","cli"],d=["OAuth","UI","UX","API","CSS","HTML","JS","TS","SVG","AI","CSRF","CORS","HTTP","HTTPS","URL","URI","DB","SQL","JSON","YAML","YML","useActionData","useAsyncError","useAsyncValue","useBeforeUnload","useFetcher","useFetchers","useFormAction","useHref","useLoaderData","useLocation","useMatches","useNavigate","useNavigation","useNavigationType","useOutlet","useOutletContext","useParams","useResolvedPath","useRevalidator","useRouteError","useRouteLoaderData","useSearchParams","useSubmit","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","useForm","useFieldset","useFieldList","useEventSource","useHydrated","useAuthenticityToken","useShouldHydrate","useGlobalNavigationState","useLocales","useDelegatedAnchors","useDebounceFetcher","useFetcherType"],u=o.filter(Boolean).map((c,h)=>{var p;const f=c.toLowerCase(),m=d.find(g=>g.toLowerCase()===f);return m||(l.includes(f)&&h>0?f:((p=f[0])==null?void 0:p.toUpperCase())+f.slice(1))}).join(" ");return r?`${u} (🏁 solution)`:u}function SD({url:i,title:e="Video Embed",loadingContent:t=H.jsx(Oh,{children:H.jsxs("span",{children:['Loading "',e,'"']})})}){const[r,s]=ft.useState(!1);return H.jsxs("div",{className:"relative aspect-video w-full flex-shrink-0 shadow-lg dark:shadow-gray-800",children:[r?null:H.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:t}),H.jsx("iframe",{onLoad:()=>s(!0),onError:()=>s(!0),src:i,className:wb("absolute inset-0 flex h-full w-full transition-opacity duration-300",r?"opacity-100":"opacity-0"),title:e,sandbox:"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",allowFullScreen:!0})]})}function bb({url:i,title:e}){return H.jsxs("a",{href:i,target:"_blank",className:"flex items-center gap-1 text-base no-underline opacity-70 transition hover:underline hover:opacity-100",rel:"noreferrer",children:[H.jsx(Cb,{className:"flex-shrink-0",name:"Video",size:"lg"}),e," ",H.jsx("span",{"aria-hidden":!0,children:"↗︎"})]})}function dM({url:i,title:e=yb(i)}){const{product:{host:t,displayName:r}}=Nb(),s=Ob(),n=ft.useContext(Eb),a=H.jsx("div",{children:H.jsx(bb,{url:i,title:e})});return H.jsx("div",{children:H.jsx(ft.Suspense,{fallback:H.jsxs("div",{children:[H.jsx("div",{className:"flex aspect-video w-full items-center justify-center",children:H.jsx(Oh,{children:e})}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,H.jsx("div",{className:"h-[32px]"})]})]}),children:H.jsx(Pb,{errorElement:H.jsx("div",{children:"Sorry, failed loading videos. Check the terminal output?"}),resolve:n,children:o=>{const l=o==null?void 0:o[i],d=ENV.EPICSHOP_DEPLOYED?H.jsxs("div",{children:[H.jsx(ja,{to:ENV.EPICSHOP_GITHUB_REPO,className:"underline",children:"Run locally"})," for transcripts"]}):H.jsxs("div",{children:[H.jsx(ja,{to:"/login",className:"underline",children:s?"Upgrade":"Login"})," for transcripts"]});if(!l)return H.jsxs("div",{children:[H.jsx(Gn,{url:i,title:e}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,d]})]});const u=l;return u.status==="success"?H.jsx(xD,{url:i,title:e,muxPlaybackId:u.muxPlaybackId,transcript:u.transcript}):u.type==="region-restricted"?H.jsxs("div",{children:[H.jsxs("div",{className:"flex aspect-video min-h-full min-w-full flex-col items-center justify-start gap-2 overflow-y-scroll border-2 p-4 lg:justify-center lg:gap-4 lg:text-xl",children:[H.jsx("div",{className:"!text-foreground-danger",children:"Error: Region Restricted"}),H.jsxs("div",{children:["We've detected you're connecting from"," ",u.requestCountry," but your license has restricted access to ",u.restrictedCountry]}),H.jsxs("div",{children:["To continue watching uninterrupted, please"," ",H.jsxs("a",{href:`https://${t}/products`,className:"underline",children:["upgrade your ",r," license"]})," ","to a full Pro license."]})]}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,H.jsxs("div",{children:[H.jsx(ja,{to:`https://${t}/products`,className:"underline",children:"Upgrade"})," for transcripts"]})]})]}):u.statusCode===401?H.jsxs("div",{children:[H.jsx(Gn,{url:i,title:e}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,d]})]}):u.statusCode===403?H.jsxs("div",{children:[H.jsx(Gn,{url:i,title:e}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,H.jsxs("div",{children:[H.jsx(ja,{to:`https://${t}/products`,className:"underline",children:"Upgrade"})," for transcripts"]})]})]}):u.statusCode===404?H.jsxs("div",{children:[H.jsx(Gn,{url:i,title:e}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,H.jsx("div",{children:"Transcripts not found"})]})]}):(console.error(u),H.jsxs("div",{children:[H.jsx(Gn,{url:i,title:e}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,H.jsx("div",{className:"!text-foreground-danger",children:"Unknown error (check console)"})]})]}))}})})})}function xD({url:i,title:e=yb(i),muxPlaybackId:t,transcript:r}){const s=ft.useRef(null),n=/(\d+:\d+)/g,a=[];let o,l=0;for(;o=n.exec(r);){const d=o[1];if(!n.lastIndex||!d)break;const u=o.index,c=n.lastIndex,h=r.slice(l+1,u-1);a.push(H.jsx("span",{children:h},u)),a.push(H.jsx("button",{className:"underline",onClick:f=>{s.current&&(s.current.currentTime=kD(d),s.current.play(),s.current.scrollIntoView({behavior:"smooth",inline:"center",block:"start"}),f.currentTarget.blur())},children:d},d)),l=c}return a.push(H.jsx("span",{children:r.slice(l+1,r.length)},r.length)),H.jsxs("div",{children:[H.jsx("div",{className:"shadow-lg dark:shadow-gray-800",children:H.jsx(AD,{playbackId:t,muxPlayerRef:s,title:e})}),H.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[H.jsx(bb,{url:i,title:e}),H.jsxs("details",{children:[H.jsx("summary",{children:"Transcript"}),H.jsx("div",{className:"whitespace-pre-line rounded-md bg-accent p-2 text-accent-foreground",children:a})]})]})]})}function kD(i){const e=i.split(":");let t=0,r=1;for(;e.length>0;)t+=r*parseInt(e.pop()??"0",10),r*=60;return t}function Gn({url:i,title:e}){const t=Ib();let r=new URL("https://epicweb.dev");try{r=new URL(i)}catch(s){return console.error(s),H.jsxs("div",{children:['Invalid URL: "',i,'"']})}return r.pathname=r.pathname.endsWith("/")?`${r.pathname}embed`:`${r.pathname}/embed`,r.searchParams.set("theme",t),H.jsx(SD,{url:r.toString(),title:e,loadingContent:H.jsx(Oh,{children:H.jsxs("span",{children:['Loading "',H.jsx("a",{className:"underline",href:i,children:e}),'"']})})})}export{dM as D,lM as E,SD as V};
3053
- //# sourceMappingURL=epic-video-GDpD7_Qt.js.map
3053
+ //# sourceMappingURL=epic-video-Dw5Vkxid.js.map