@epic-web/workshop-app 4.28.1 → 4.28.3

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 (94) hide show
  1. package/build/client/assets/{_-C82olNpL.js → _-D0Tgngwe.js} +2 -2
  2. package/build/client/assets/{_-C82olNpL.js.map → _-D0Tgngwe.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-DeMmiDU5.js → _exerciseNumber-j9COGU-R.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-DeMmiDU5.js.map → _exerciseNumber-j9COGU-R.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-qCtEMlS2.js → _exerciseNumber_._stepNumber-7kSd_6hH.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-qCtEMlS2.js.map → _exerciseNumber_._stepNumber-7kSd_6hH.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber_.finished-DM5HZX6r.js → _exerciseNumber_.finished-DDNPeo8x.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber_.finished-DM5HZX6r.js.map → _exerciseNumber_.finished-DDNPeo8x.js.map} +1 -1
  9. package/build/client/assets/_layout-BPwIOXxN.js +6 -0
  10. package/build/client/assets/_layout-BPwIOXxN.js.map +1 -0
  11. package/build/client/assets/{_layout-DATuycts.js → _layout-BwzhY4NI.js} +2 -2
  12. package/build/client/assets/{_layout-DATuycts.js.map → _layout-BwzhY4NI.js.map} +1 -1
  13. package/build/client/assets/{_layout-5idP3Bqx.js → _layout-DZWGV4Uf.js} +2 -2
  14. package/build/client/assets/{_layout-5idP3Bqx.js.map → _layout-DZWGV4Uf.js.map} +1 -1
  15. package/build/client/assets/{accordion-CKwXYK9L.js → accordion-OfO-5m5D.js} +2 -2
  16. package/build/client/assets/{accordion-CKwXYK9L.js.map → accordion-OfO-5m5D.js.map} +1 -1
  17. package/build/client/assets/{account-D1DCJCnR.js → account-BatJhmSV.js} +2 -2
  18. package/build/client/assets/{account-D1DCJCnR.js.map → account-BatJhmSV.js.map} +1 -1
  19. package/build/client/assets/app-CJ9ElQg6.js +2 -0
  20. package/build/client/assets/{app-B6_qsli7.js.map → app-CJ9ElQg6.js.map} +1 -1
  21. package/build/client/assets/{button-CQ6cnotS.js → button-EE0aPg10.js} +2 -2
  22. package/build/client/assets/{button-CQ6cnotS.js.map → button-EE0aPg10.js.map} +1 -1
  23. package/build/client/assets/{diff-CU8At1c4.js → diff-BEEJhGiC.js} +2 -2
  24. package/build/client/assets/{diff-CU8At1c4.js.map → diff-BEEJhGiC.js.map} +1 -1
  25. package/build/client/assets/{diff-hoOood-9.js → diff-BXHLJqTK.js} +2 -2
  26. package/build/client/assets/{diff-hoOood-9.js.map → diff-BXHLJqTK.js.map} +1 -1
  27. package/build/client/assets/{discord-CgdmSzxV.js → discord-BRTW4Rnh.js} +2 -2
  28. package/build/client/assets/{discord-CgdmSzxV.js.map → discord-BRTW4Rnh.js.map} +1 -1
  29. package/build/client/assets/discord-BhzUjmbI.js +2 -0
  30. package/build/client/assets/discord-BhzUjmbI.js.map +1 -0
  31. package/build/client/assets/{epic-video-BFcdejfC.js → epic-video-DZzPuXR8.js} +2 -2
  32. package/build/client/assets/{epic-video-BFcdejfC.js.map → epic-video-DZzPuXR8.js.map} +1 -1
  33. package/build/client/assets/{error-boundary-CqgVAFiu.js → error-boundary-COkPRBOZ.js} +2 -2
  34. package/build/client/assets/{error-boundary-CqgVAFiu.js.map → error-boundary-COkPRBOZ.js.map} +1 -1
  35. package/build/client/assets/{finished-C_v7hO19.js → finished-Dop_5v80.js} +2 -2
  36. package/build/client/assets/{finished-C_v7hO19.js.map → finished-Dop_5v80.js.map} +1 -1
  37. package/build/client/assets/{icons-CnZJXICl.svg → icons-BtWYk6Ws.svg} +17 -0
  38. package/build/client/assets/{index-9dWszLxO.js → index-BwhlO_gF.js} +2 -2
  39. package/build/client/assets/{index-9dWszLxO.js.map → index-BwhlO_gF.js.map} +1 -1
  40. package/build/client/assets/{index-j_VpxCZh.js → index-CXyf3Reb.js} +2 -2
  41. package/build/client/assets/{index-j_VpxCZh.js.map → index-CXyf3Reb.js.map} +1 -1
  42. package/build/client/assets/{index-BHeB-0xq.js → index-D-l_qaLC.js} +2 -2
  43. package/build/client/assets/{index-BHeB-0xq.js.map → index-D-l_qaLC.js.map} +1 -1
  44. package/build/client/assets/{index-DlJAkutV.js → index-YNIH4TH8.js} +2 -2
  45. package/build/client/assets/{index-DlJAkutV.js.map → index-YNIH4TH8.js.map} +1 -1
  46. package/build/client/assets/{index-CoqhTiwT.js → index-ZZCxObNp.js} +2 -2
  47. package/build/client/assets/{index-CoqhTiwT.js.map → index-ZZCxObNp.js.map} +1 -1
  48. package/build/client/assets/loading-sXkYDMsx.js +2 -0
  49. package/build/client/assets/loading-sXkYDMsx.js.map +1 -0
  50. package/build/client/assets/login-Cc73KLYm.js +2 -0
  51. package/build/client/assets/login-Cc73KLYm.js.map +1 -0
  52. package/build/client/assets/{manifest-0d2d0a8f.js → manifest-1d60a768.js} +1 -1
  53. package/build/client/assets/{mdx-DvqHp8UI.js → mdx-DwC5Oacq.js} +2 -2
  54. package/build/client/assets/{mdx-DvqHp8UI.js.map → mdx-DwC5Oacq.js.map} +1 -1
  55. package/build/client/assets/{misc-Txs7O6JX.js → misc-CxCgA-_O.js} +2 -2
  56. package/build/client/assets/{misc-Txs7O6JX.js.map → misc-CxCgA-_O.js.map} +1 -1
  57. package/build/client/assets/{nav-chevrons-Cbc1bd_j.js → nav-chevrons-g-C0ilNz.js} +2 -2
  58. package/build/client/assets/{nav-chevrons-Cbc1bd_j.js.map → nav-chevrons-g-C0ilNz.js.map} +1 -1
  59. package/build/client/assets/{onboarding-Dc2TmI9y.js → onboarding-DE9gclYS.js} +2 -2
  60. package/build/client/assets/onboarding-DE9gclYS.js.map +1 -0
  61. package/build/client/assets/{preview-CWCIw-lc.js → preview-C7dtR2VR.js} +2 -2
  62. package/build/client/assets/{preview-CWCIw-lc.js.map → preview-C7dtR2VR.js.map} +1 -1
  63. package/build/client/assets/{product-f8Gd2MQ6.js → product-BAWG1Vut.js} +2 -2
  64. package/build/client/assets/{product-f8Gd2MQ6.js.map → product-BAWG1Vut.js.map} +1 -1
  65. package/build/client/assets/{progress-C7kc6YXZ.js → progress-BFm2U-l5.js} +2 -2
  66. package/build/client/assets/{progress-C7kc6YXZ.js.map → progress-BFm2U-l5.js.map} +1 -1
  67. package/build/client/assets/{progress-bar-bUuKn1Q8.js → progress-bar-D3kudPcr.js} +2 -2
  68. package/build/client/assets/{progress-bar-bUuKn1Q8.js.map → progress-bar-D3kudPcr.js.map} +1 -1
  69. package/build/client/assets/{root-CbC_P7jJ.js → root-BOrI36ez.js} +3 -3
  70. package/build/client/assets/{root-CbC_P7jJ.js.map → root-BOrI36ez.js.map} +1 -1
  71. package/build/client/assets/{set-playground-Cr0qL9N9.js → set-playground-DW0yVaNn.js} +2 -2
  72. package/build/client/assets/{set-playground-Cr0qL9N9.js.map → set-playground-DW0yVaNn.js.map} +1 -1
  73. package/build/client/assets/tailwind-CFrdHbaR.css +1 -0
  74. package/build/client/assets/test-N2HloCnX.js +2 -0
  75. package/build/client/assets/{test-Cy-fo6gv.js.map → test-N2HloCnX.js.map} +1 -1
  76. package/build/client/assets/{tests-DmimqC1q.js → tests-DUg6VXec.js} +2 -2
  77. package/build/client/assets/{tests-DmimqC1q.js.map → tests-DUg6VXec.js.map} +1 -1
  78. package/build/client/assets/{tooltip-DTFU8ajx.js → tooltip-kD4kSf1i.js} +2 -2
  79. package/build/client/assets/{tooltip-DTFU8ajx.js.map → tooltip-kD4kSf1i.js.map} +1 -1
  80. package/build/server/index.js +293 -211
  81. package/build/server/index.js.map +1 -1
  82. package/package.json +3 -3
  83. package/build/client/assets/_layout-DkGEbcMk.js +0 -6
  84. package/build/client/assets/_layout-DkGEbcMk.js.map +0 -1
  85. package/build/client/assets/app-B6_qsli7.js +0 -2
  86. package/build/client/assets/discord-BBRM_H3g.js +0 -2
  87. package/build/client/assets/discord-BBRM_H3g.js.map +0 -1
  88. package/build/client/assets/loading-CF7oQHQf.js +0 -2
  89. package/build/client/assets/loading-CF7oQHQf.js.map +0 -1
  90. package/build/client/assets/login-Ca9EDpZj.js +0 -2
  91. package/build/client/assets/login-Ca9EDpZj.js.map +0 -1
  92. package/build/client/assets/onboarding-Dc2TmI9y.js.map +0 -1
  93. package/build/client/assets/tailwind-DTowOebn.css +0 -1
  94. package/build/client/assets/test-Cy-fo6gv.js +0 -2
@@ -1,4 +1,4 @@
1
- import{R as Dd,r as pt,j as W}from"./index-1cKOJFpX.js";import{u as h_}from"./index-DlJAkutV.js";import{z as Gc}from"./request-info-CEhUGODY.js";import{f as f_,a as m_,I as p_}from"./misc-Txs7O6JX.js";import{a as g_,e as v_,A as E_,L as vo}from"./components-CME-nGId.js";import{L as rm}from"./loading-CF7oQHQf.js";import{c as b_}from"./user-DvujSs-t.js";import{u as y_}from"./workshop-config-CL4F08kr.js";var T_=Object.create,av=Object.defineProperty,__=Object.getOwnPropertyDescriptor,A_=Object.getOwnPropertyNames,S_=Object.getPrototypeOf,x_=Object.prototype.hasOwnProperty,ov=function(i,e){return function(){return i&&(e=i(i=0)),e}},vt=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}},k_=function(i,e,t,s){if(e&&typeof e=="object"||typeof e=="function")for(var r=A_(e),n=0,a=r.length,o;n<a;n++)o=r[n],!x_.call(i,o)&&o!==t&&av(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(s=__(e,o))||s.enumerable});return i},Dt=function(i,e,t){return t=i!=null?T_(S_(i)):{},k_(!i||!i.__esModule?av(t,"default",{value:i,enumerable:!0}):t,i)},Ui=vt(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 yt(i){"@swc/helpers - typeof";return i&&typeof Symbol<"u"&&i.constructor===Symbol?"symbol":typeof i}var Sc=ov(function(){}),L_=vt(function(i,e){Sc(),function(t,s){typeof define=="function"&&define.amd?define(s):typeof e=="object"&&e.exports?e.exports=s():t.log=s()}(i,function(){var t=function(){},s="undefined",r=(typeof window>"u"?"undefined":yt(window))!==s&&yt(window.navigator)!==s&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function a(g,v){var y=g[v];if(typeof y.bind=="function")return y.bind(g);try{return Function.prototype.bind.call(y,g)}catch{return function(){return Function.prototype.apply.apply(y,[g,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(g){return g==="debug"&&(g="log"),(typeof console>"u"?"undefined":yt(console))===s?!1:g==="trace"&&r?o:console[g]!==void 0?a(console,g):console.log!==void 0?a(console,"log"):t}function d(g,v){for(var y=0;y<n.length;y++){var b=n[y];this[b]=y<g?t:this.methodFactory(b,g,v)}this.log=this.debug}function c(g,v,y){return function(){(typeof console>"u"?"undefined":yt(console))!==s&&(d.call(this,v,y),this[g].apply(this,arguments))}}function u(g,v,y){return l(g)||c.apply(this,arguments)}function h(g,v,y){var b=this,x;v=v??"WARN";var _="loglevel";typeof g=="string"?_+=":"+g:(typeof g>"u"?"undefined":yt(g))==="symbol"&&(_=void 0);function S(L){var C=(n[L]||"silent").toUpperCase();if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{window.localStorage[_]=C;return}catch{}try{window.document.cookie=encodeURIComponent(_)+"="+C+";"}catch{}}}function A(){var L;if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{L=window.localStorage[_]}catch{}if((typeof L>"u"?"undefined":yt(L))===s)try{var C=window.document.cookie,H=C.indexOf(encodeURIComponent(_)+"=");H!==-1&&(L=/^([^;]+)/.exec(C.slice(H))[1])}catch{}return b.levels[L]===void 0&&(L=void 0),L}}function D(){if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{window.localStorage.removeItem(_);return}catch{}try{window.document.cookie=encodeURIComponent(_)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}b.name=g,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=y||u,b.getLevel=function(){return x},b.setLevel=function(L,C){if(typeof L=="string"&&b.levels[L.toUpperCase()]!==void 0&&(L=b.levels[L.toUpperCase()]),typeof L=="number"&&L>=0&&L<=b.levels.SILENT){if(x=L,C!==!1&&S(L),d.call(b,L,g),(typeof console>"u"?"undefined":yt(console))===s&&L<b.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+L},b.setDefaultLevel=function(L){v=L,A()||b.setLevel(L,!1)},b.resetLevel=function(){b.setLevel(v,!1),D()},b.enableAll=function(L){b.setLevel(b.levels.TRACE,L)},b.disableAll=function(L){b.setLevel(b.levels.SILENT,L)};var O=A();O==null&&(O=v),b.setLevel(O,!1)}var f=new h,m={};f.getLogger=function(g){if((typeof g>"u"?"undefined":yt(g))!=="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var v=m[g];return v||(v=m[g]=new h(g,f.getLevel(),f.methodFactory)),v};var p=(typeof window>"u"?"undefined":yt(window))!==s?window.log:void 0;return f.noConflict=function(){return(typeof window>"u"?"undefined":yt(window))!==s&&window.log===f&&(window.log=p),f},f.getLoggers=function(){return m},f.default=f,f})});function kr(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):kr(i,e)}var Lr=ov(function(){Lr()}),I_=vt(function(i){var e=Object.prototype.hasOwnProperty,t;function s(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function r(o){try{return encodeURIComponent(o)}catch{return null}}function n(o){for(var l=/([^=?#&]+)=?([^&]*)/g,d={},c;c=l.exec(o);){var u=s(c[1]),h=s(c[2]);u===null||h===null||u in d||(d[u]=h)}return d}function a(o,l){l=l||"";var d=[],c,u;typeof l!="string"&&(l="?");for(u in o)if(e.call(o,u)){if(c=o[u],!c&&(c===null||c===t||isNaN(c))&&(c=""),u=r(u),c=r(c),u===null||c===null)continue;d.push(u+"="+c)}return d.length?l+d.join("&"):""}i.stringify=a,i.parse=n}),R_=vt(function(i,e){(function(t){var s=!1;if(typeof define=="function"&&define.amd&&(define(t),s=!0),typeof i=="object"&&(e.exports=t(),s=!0),!s){var r=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=r,n}}})(function(){var t=function(){for(var r=0,n={};r<arguments.length;r++){var a=arguments[r];for(var o in a)n[o]=a[o]}return n};function s(r){function n(a,o,l){var d;if(typeof document<"u"){if(arguments.length>1){if(l=t({path:"/"},n.defaults,l),typeof l.expires=="number"){var c=new Date;c.setMilliseconds(c.getMilliseconds()+l.expires*864e5),l.expires=c}try{d=JSON.stringify(o),/^[\{\[]/.test(d)&&(o=d)}catch{}return r.write?o=r.write(o,a):o=encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=encodeURIComponent(String(a)),a=a.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),a=a.replace(/[\(\)]/g,escape),document.cookie=[a,"=",o,l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}a||(d={});for(var u=document.cookie?document.cookie.split("; "):[],h=/(%[0-9A-Z]{2})+/g,f=0;f<u.length;f++){var m=u[f].split("="),p=m.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{var g=m[0].replace(h,decodeURIComponent);if(p=r.read?r.read(p,g):r(p,g)||p.replace(h,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch{}if(a===g){d=p;break}a||(d[g]=p)}catch{}}return d}}return n.set=n,n.get=function(a){return n.call(n,a)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(a,o){n(a,"",t(o,{expires:-1}))},n.withConverter=s,n}return s(function(){})})}),lv=vt(function(i,e){var t=Array.prototype.slice;e.exports=s;function s(r,n){for(("length"in r)||(r=[r]),r=t.call(r);r.length;){var a=r.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(r=t.call(a.childNodes).concat(r))}}}),w_=vt(function(i,e){Lr(),e.exports=t;function t(s,r){if(!kr(this,t))return new t(s,r);this.data=s,this.nodeValue=s,this.length=s.length,this.ownerDocument=r||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),C_=vt(function(i,e){Lr(),e.exports=t;function t(s,r){if(!kr(this,t))return new t(s);this.data=s||"",this.length=this.data.length,this.ownerDocument=r||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(s,r,n){var a=this.data,o=a.substring(0,s),l=a.substring(s+r,a.length);this.data=o+n+l,this.length=this.data.length}}),dv=vt(function(i,e){e.exports=t;function t(s){var r=this,n=s.type;s.target||(s.target=r),r.listeners||(r.listeners={});var a=r.listeners[n];if(a)return a.forEach(function(o){s.currentTarget=r,typeof o=="function"?o(s):o.handleEvent(s)});r.parentNode&&r.parentNode.dispatchEvent(s)}}),cv=vt(function(i,e){e.exports=t;function t(s,r){var n=this;n.listeners||(n.listeners={}),n.listeners[s]||(n.listeners[s]=[]),n.listeners[s].indexOf(r)===-1&&n.listeners[s].push(r)}}),uv=vt(function(i,e){e.exports=t;function t(s,r){var n=this;if(n.listeners&&n.listeners[s]){var a=n.listeners[s],o=a.indexOf(r);o!==-1&&a.splice(o,1)}}}),D_=vt(function(i,e){Sc(),e.exports=s;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function s(h){switch(h.nodeType){case 3:return c(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(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(s)):h.textContent||h.innerText?f.push(c(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=yt(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+'="'+u(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 v=h._attributes[p][g],y=(v.prefix?v.prefix+":":"")+g;f.push({name:y,value:v.value})}return h.className&&f.push({name:"class",value:h.className}),f.length?l(f):""}function c(h){var f="";return typeof h=="string"?f=h:h&&(f=h.toString()),f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(h){return c(h).replace(/"/g,"&quot;")}}),hv=vt(function(i,e){Lr();var t=lv(),s=dv(),r=cv(),n=uv(),a=D_(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,c,u){if(!kr(this,l))return new l(d);var h=u===void 0?o:u||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=c||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,c){d.parentNode&&d.parentNode.removeChild(d);var u=this.childNodes.indexOf(c);return c.parentNode=null,this.childNodes[u]=d,d.parentNode=this,c},l.prototype.removeChild=function(d){var c=this.childNodes.indexOf(d);return this.childNodes.splice(c,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,c){d.parentNode&&d.parentNode.removeChild(d);var u=c==null?-1:this.childNodes.indexOf(c);return u>-1?this.childNodes.splice(u,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,c,u){var h=null,f=c,m=c.indexOf(":");if(m>-1&&(h=c.substr(0,m),f=c.substr(m+1)),this.tagName==="INPUT"&&c==="type")this.type=u;else{var p=this._attributes[d]||(this._attributes[d]={});p[f]={value:u,prefix:h}}},l.prototype.getAttributeNS=function(d,c){var u=this._attributes[d],h=u&&u[c]&&u[c].value;return this.tagName==="INPUT"&&c==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,c){var u=this._attributes[d];u&&delete u[c]},l.prototype.hasAttributeNS=function(d,c){var u=this._attributes[d];return!!u&&c in u},l.prototype.setAttribute=function(d,c){return this.setAttributeNS(null,d,c)},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=r,l.prototype.dispatchEvent=s,l.prototype.focus=function(){},l.prototype.toString=function(){return a(this)},l.prototype.getElementsByClassName=function(d){var c=d.split(" "),u=[];return t(this,function(h){if(h.nodeType===1){var f=h.className||"",m=f.split(" ");c.every(function(p){return m.indexOf(p)!==-1})&&u.push(h)}}),u},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var c=[];return t(this.childNodes,function(u){u.nodeType===1&&(d==="*"||u.tagName.toLowerCase()===d)&&c.push(u)}),c},l.prototype.contains=function(d){return t(this,function(c){return d===c})||!1}}),M_=vt(function(i,e){Lr();var t=hv();e.exports=s;function s(r){if(!kr(this,s))return new s;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}s.prototype.type="DocumentFragment",s.prototype.nodeType=11,s.prototype.nodeName="#document-fragment",s.prototype.appendChild=t.prototype.appendChild,s.prototype.replaceChild=t.prototype.replaceChild,s.prototype.removeChild=t.prototype.removeChild,s.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),O_=vt(function(i,e){e.exports=t;function t(s){}t.prototype.initEvent=function(s,r,n){this.type=s,this.bubbles=r,this.cancelable=n},t.prototype.preventDefault=function(){}}),P_=vt(function(i,e){Lr();var t=lv(),s=w_(),r=C_(),n=hv(),a=M_(),o=O_(),l=dv(),d=cv(),c=uv();e.exports=u;function u(){if(!kr(this,u))return new u;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=u.prototype;h.createTextNode=function(f){return new r(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 s(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=c,h.addEventListener=d,h.dispatchEvent=l}),N_=vt(function(i,e){var t=P_();e.exports=new t}),U_=vt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},s=N_(),r;typeof document<"u"?r=document:(r=t["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=t["__GLOBAL_DOCUMENT_CACHE@4"]=s)),e.exports=r});function F_(i){if(Array.isArray(i))return i}function $_(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var s=[],r=!0,n=!1,a,o;try{for(t=t.call(i);!(r=(a=t.next()).done)&&(s.push(a.value),!(e&&s.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&t.return!=null&&t.return()}finally{if(n)throw o}}return s}}function B_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{R as Dd,r as pt,j as W}from"./index-1cKOJFpX.js";import{u as h_}from"./index-YNIH4TH8.js";import{z as Gc}from"./request-info-CEhUGODY.js";import{f as f_,a as m_,I as p_}from"./misc-CxCgA-_O.js";import{a as g_,e as v_,A as E_,L as vo}from"./components-CME-nGId.js";import{L as rm}from"./loading-sXkYDMsx.js";import{c as b_}from"./user-DvujSs-t.js";import{u as y_}from"./workshop-config-CL4F08kr.js";var T_=Object.create,av=Object.defineProperty,__=Object.getOwnPropertyDescriptor,A_=Object.getOwnPropertyNames,S_=Object.getPrototypeOf,x_=Object.prototype.hasOwnProperty,ov=function(i,e){return function(){return i&&(e=i(i=0)),e}},vt=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}},k_=function(i,e,t,s){if(e&&typeof e=="object"||typeof e=="function")for(var r=A_(e),n=0,a=r.length,o;n<a;n++)o=r[n],!x_.call(i,o)&&o!==t&&av(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(s=__(e,o))||s.enumerable});return i},Dt=function(i,e,t){return t=i!=null?T_(S_(i)):{},k_(!i||!i.__esModule?av(t,"default",{value:i,enumerable:!0}):t,i)},Ui=vt(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 yt(i){"@swc/helpers - typeof";return i&&typeof Symbol<"u"&&i.constructor===Symbol?"symbol":typeof i}var Sc=ov(function(){}),L_=vt(function(i,e){Sc(),function(t,s){typeof define=="function"&&define.amd?define(s):typeof e=="object"&&e.exports?e.exports=s():t.log=s()}(i,function(){var t=function(){},s="undefined",r=(typeof window>"u"?"undefined":yt(window))!==s&&yt(window.navigator)!==s&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function a(g,v){var y=g[v];if(typeof y.bind=="function")return y.bind(g);try{return Function.prototype.bind.call(y,g)}catch{return function(){return Function.prototype.apply.apply(y,[g,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(g){return g==="debug"&&(g="log"),(typeof console>"u"?"undefined":yt(console))===s?!1:g==="trace"&&r?o:console[g]!==void 0?a(console,g):console.log!==void 0?a(console,"log"):t}function d(g,v){for(var y=0;y<n.length;y++){var b=n[y];this[b]=y<g?t:this.methodFactory(b,g,v)}this.log=this.debug}function c(g,v,y){return function(){(typeof console>"u"?"undefined":yt(console))!==s&&(d.call(this,v,y),this[g].apply(this,arguments))}}function u(g,v,y){return l(g)||c.apply(this,arguments)}function h(g,v,y){var b=this,x;v=v??"WARN";var _="loglevel";typeof g=="string"?_+=":"+g:(typeof g>"u"?"undefined":yt(g))==="symbol"&&(_=void 0);function S(L){var C=(n[L]||"silent").toUpperCase();if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{window.localStorage[_]=C;return}catch{}try{window.document.cookie=encodeURIComponent(_)+"="+C+";"}catch{}}}function A(){var L;if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{L=window.localStorage[_]}catch{}if((typeof L>"u"?"undefined":yt(L))===s)try{var C=window.document.cookie,H=C.indexOf(encodeURIComponent(_)+"=");H!==-1&&(L=/^([^;]+)/.exec(C.slice(H))[1])}catch{}return b.levels[L]===void 0&&(L=void 0),L}}function D(){if(!((typeof window>"u"?"undefined":yt(window))===s||!_)){try{window.localStorage.removeItem(_);return}catch{}try{window.document.cookie=encodeURIComponent(_)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}b.name=g,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=y||u,b.getLevel=function(){return x},b.setLevel=function(L,C){if(typeof L=="string"&&b.levels[L.toUpperCase()]!==void 0&&(L=b.levels[L.toUpperCase()]),typeof L=="number"&&L>=0&&L<=b.levels.SILENT){if(x=L,C!==!1&&S(L),d.call(b,L,g),(typeof console>"u"?"undefined":yt(console))===s&&L<b.levels.SILENT)return"No console available for logging"}else throw"log.setLevel() called with invalid level: "+L},b.setDefaultLevel=function(L){v=L,A()||b.setLevel(L,!1)},b.resetLevel=function(){b.setLevel(v,!1),D()},b.enableAll=function(L){b.setLevel(b.levels.TRACE,L)},b.disableAll=function(L){b.setLevel(b.levels.SILENT,L)};var O=A();O==null&&(O=v),b.setLevel(O,!1)}var f=new h,m={};f.getLogger=function(g){if((typeof g>"u"?"undefined":yt(g))!=="symbol"&&typeof g!="string"||g==="")throw new TypeError("You must supply a name when creating a logger.");var v=m[g];return v||(v=m[g]=new h(g,f.getLevel(),f.methodFactory)),v};var p=(typeof window>"u"?"undefined":yt(window))!==s?window.log:void 0;return f.noConflict=function(){return(typeof window>"u"?"undefined":yt(window))!==s&&window.log===f&&(window.log=p),f},f.getLoggers=function(){return m},f.default=f,f})});function kr(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):kr(i,e)}var Lr=ov(function(){Lr()}),I_=vt(function(i){var e=Object.prototype.hasOwnProperty,t;function s(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function r(o){try{return encodeURIComponent(o)}catch{return null}}function n(o){for(var l=/([^=?#&]+)=?([^&]*)/g,d={},c;c=l.exec(o);){var u=s(c[1]),h=s(c[2]);u===null||h===null||u in d||(d[u]=h)}return d}function a(o,l){l=l||"";var d=[],c,u;typeof l!="string"&&(l="?");for(u in o)if(e.call(o,u)){if(c=o[u],!c&&(c===null||c===t||isNaN(c))&&(c=""),u=r(u),c=r(c),u===null||c===null)continue;d.push(u+"="+c)}return d.length?l+d.join("&"):""}i.stringify=a,i.parse=n}),R_=vt(function(i,e){(function(t){var s=!1;if(typeof define=="function"&&define.amd&&(define(t),s=!0),typeof i=="object"&&(e.exports=t(),s=!0),!s){var r=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=r,n}}})(function(){var t=function(){for(var r=0,n={};r<arguments.length;r++){var a=arguments[r];for(var o in a)n[o]=a[o]}return n};function s(r){function n(a,o,l){var d;if(typeof document<"u"){if(arguments.length>1){if(l=t({path:"/"},n.defaults,l),typeof l.expires=="number"){var c=new Date;c.setMilliseconds(c.getMilliseconds()+l.expires*864e5),l.expires=c}try{d=JSON.stringify(o),/^[\{\[]/.test(d)&&(o=d)}catch{}return r.write?o=r.write(o,a):o=encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=encodeURIComponent(String(a)),a=a.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),a=a.replace(/[\(\)]/g,escape),document.cookie=[a,"=",o,l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}a||(d={});for(var u=document.cookie?document.cookie.split("; "):[],h=/(%[0-9A-Z]{2})+/g,f=0;f<u.length;f++){var m=u[f].split("="),p=m.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{var g=m[0].replace(h,decodeURIComponent);if(p=r.read?r.read(p,g):r(p,g)||p.replace(h,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch{}if(a===g){d=p;break}a||(d[g]=p)}catch{}}return d}}return n.set=n,n.get=function(a){return n.call(n,a)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(a,o){n(a,"",t(o,{expires:-1}))},n.withConverter=s,n}return s(function(){})})}),lv=vt(function(i,e){var t=Array.prototype.slice;e.exports=s;function s(r,n){for(("length"in r)||(r=[r]),r=t.call(r);r.length;){var a=r.shift(),o=n(a);if(o)return o;a.childNodes&&a.childNodes.length&&(r=t.call(a.childNodes).concat(r))}}}),w_=vt(function(i,e){Lr(),e.exports=t;function t(s,r){if(!kr(this,t))return new t(s,r);this.data=s,this.nodeValue=s,this.length=s.length,this.ownerDocument=r||null}t.prototype.nodeType=8,t.prototype.nodeName="#comment",t.prototype.toString=function(){return"[object Comment]"}}),C_=vt(function(i,e){Lr(),e.exports=t;function t(s,r){if(!kr(this,t))return new t(s);this.data=s||"",this.length=this.data.length,this.ownerDocument=r||null}t.prototype.type="DOMTextNode",t.prototype.nodeType=3,t.prototype.nodeName="#text",t.prototype.toString=function(){return this.data},t.prototype.replaceData=function(s,r,n){var a=this.data,o=a.substring(0,s),l=a.substring(s+r,a.length);this.data=o+n+l,this.length=this.data.length}}),dv=vt(function(i,e){e.exports=t;function t(s){var r=this,n=s.type;s.target||(s.target=r),r.listeners||(r.listeners={});var a=r.listeners[n];if(a)return a.forEach(function(o){s.currentTarget=r,typeof o=="function"?o(s):o.handleEvent(s)});r.parentNode&&r.parentNode.dispatchEvent(s)}}),cv=vt(function(i,e){e.exports=t;function t(s,r){var n=this;n.listeners||(n.listeners={}),n.listeners[s]||(n.listeners[s]=[]),n.listeners[s].indexOf(r)===-1&&n.listeners[s].push(r)}}),uv=vt(function(i,e){e.exports=t;function t(s,r){var n=this;if(n.listeners&&n.listeners[s]){var a=n.listeners[s],o=a.indexOf(r);o!==-1&&a.splice(o,1)}}}),D_=vt(function(i,e){Sc(),e.exports=s;var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function s(h){switch(h.nodeType){case 3:return c(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(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(s)):h.textContent||h.innerText?f.push(c(h.textContent||h.innerText)):h.innerHTML&&f.push(h.innerHTML),f.push("</"+m+">")),f.join("")}function n(h,f){var m=yt(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+'="'+u(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 v=h._attributes[p][g],y=(v.prefix?v.prefix+":":"")+g;f.push({name:y,value:v.value})}return h.className&&f.push({name:"class",value:h.className}),f.length?l(f):""}function c(h){var f="";return typeof h=="string"?f=h:h&&(f=h.toString()),f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(h){return c(h).replace(/"/g,"&quot;")}}),hv=vt(function(i,e){Lr();var t=lv(),s=dv(),r=cv(),n=uv(),a=D_(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,c,u){if(!kr(this,l))return new l(d);var h=u===void 0?o:u||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=c||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,c){d.parentNode&&d.parentNode.removeChild(d);var u=this.childNodes.indexOf(c);return c.parentNode=null,this.childNodes[u]=d,d.parentNode=this,c},l.prototype.removeChild=function(d){var c=this.childNodes.indexOf(d);return this.childNodes.splice(c,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,c){d.parentNode&&d.parentNode.removeChild(d);var u=c==null?-1:this.childNodes.indexOf(c);return u>-1?this.childNodes.splice(u,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,c,u){var h=null,f=c,m=c.indexOf(":");if(m>-1&&(h=c.substr(0,m),f=c.substr(m+1)),this.tagName==="INPUT"&&c==="type")this.type=u;else{var p=this._attributes[d]||(this._attributes[d]={});p[f]={value:u,prefix:h}}},l.prototype.getAttributeNS=function(d,c){var u=this._attributes[d],h=u&&u[c]&&u[c].value;return this.tagName==="INPUT"&&c==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,c){var u=this._attributes[d];u&&delete u[c]},l.prototype.hasAttributeNS=function(d,c){var u=this._attributes[d];return!!u&&c in u},l.prototype.setAttribute=function(d,c){return this.setAttributeNS(null,d,c)},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=r,l.prototype.dispatchEvent=s,l.prototype.focus=function(){},l.prototype.toString=function(){return a(this)},l.prototype.getElementsByClassName=function(d){var c=d.split(" "),u=[];return t(this,function(h){if(h.nodeType===1){var f=h.className||"",m=f.split(" ");c.every(function(p){return m.indexOf(p)!==-1})&&u.push(h)}}),u},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var c=[];return t(this.childNodes,function(u){u.nodeType===1&&(d==="*"||u.tagName.toLowerCase()===d)&&c.push(u)}),c},l.prototype.contains=function(d){return t(this,function(c){return d===c})||!1}}),M_=vt(function(i,e){Lr();var t=hv();e.exports=s;function s(r){if(!kr(this,s))return new s;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}s.prototype.type="DocumentFragment",s.prototype.nodeType=11,s.prototype.nodeName="#document-fragment",s.prototype.appendChild=t.prototype.appendChild,s.prototype.replaceChild=t.prototype.replaceChild,s.prototype.removeChild=t.prototype.removeChild,s.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),O_=vt(function(i,e){e.exports=t;function t(s){}t.prototype.initEvent=function(s,r,n){this.type=s,this.bubbles=r,this.cancelable=n},t.prototype.preventDefault=function(){}}),P_=vt(function(i,e){Lr();var t=lv(),s=w_(),r=C_(),n=hv(),a=M_(),o=O_(),l=dv(),d=cv(),c=uv();e.exports=u;function u(){if(!kr(this,u))return new u;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=u.prototype;h.createTextNode=function(f){return new r(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 s(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=c,h.addEventListener=d,h.dispatchEvent=l}),N_=vt(function(i,e){var t=P_();e.exports=new t}),U_=vt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},s=N_(),r;typeof document<"u"?r=document:(r=t["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=t["__GLOBAL_DOCUMENT_CACHE@4"]=s)),e.exports=r});function F_(i){if(Array.isArray(i))return i}function $_(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var s=[],r=!0,n=!1,a,o;try{for(t=t.call(i);!(r=(a=t.next()).done)&&(s.push(a.value),!(e&&s.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&t.return!=null&&t.return()}finally{if(n)throw o}}return s}}function B_(){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 Mp(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}function G_(i,e){if(i){if(typeof i=="string")return Mp(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 Mp(i,e)}}function Tr(i,e){return F_(i)||$_(i,e)||G_(i,e)||B_()}var Da=Dt(Ui()),Ka=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)})},fv=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},Ms=function(i){if(i&&typeof i.nodeName<"u")return i.muxId||(i.muxId=fv()),i.muxId;var e;try{e=document.querySelector(i)}catch{}return e&&!e.muxId&&(e.muxId=i),(e==null?void 0:e.muxId)||i},Wu=function(i){var e;i&&typeof i.nodeName<"u"?(e=i,i=Ms(e)):e=document.querySelector(i);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,i,t]},Va=Dt(L_()),H_=Va.default.methodFactory;Va.default.methodFactory=function(i,e,t){var s=H_(i,e,t);return function(){for(var r=["[mux]"],n=0;n<arguments.length;n++)r.push(arguments[n]);s.apply(void 0,r)}};Va.default.setLevel(Va.default.getLevel());var Pe=Va.default,Hc=Dt(Ui());function Ku(){var i=Hc.default.doNotTrack||Hc.default.navigator&&Hc.default.navigator.doNotTrack;return i==="1"}var W_=Dt(Ui()),K_={now:function(){var i=W_.default.performance,e=i&&i.timing,t=e&&e.navigationStart,s=typeof t=="number"&&typeof i.now=="function"?t+i.now():Date.now();return Math.round(s)}},Qe=K_;function ne(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}Lr();function ct(i,e){if(!kr(i,e))throw new TypeError("Cannot call a class as a function")}function V_(i,e){for(var t=0;t<e.length;t++){var s=e[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,s.key,s)}}function Fi(i,e,t){return e&&V_(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 Vu(i,e){return Vu=Object.setPrototypeOf||function(t,s){return t.__proto__=s,t},Vu(i,e)}function q_(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&&Vu(i,e)}function Md(i){return Md=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Md(i)}function Y_(){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}}Sc();function j_(i,e){return e&&(yt(e)==="object"||typeof e=="function")?e:ne(i)}function z_(i){var e=Y_();return function(){var t=Md(i),s;if(e){var r=Md(this).constructor;s=Reflect.construct(t,arguments,r)}else s=t.apply(this,arguments);return j_(this,s)}}var Jt=function(i){return qa(i)[0]},qa=function(i){if(typeof i!="string"||i==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,t=i.match(e)||[],s=t[4],r;return s&&(r=(s.match(/[^\.]+\.[^\.]+$/)||[])[0]),[s,r]},Wc=Dt(Ui()),X_={exists:function(){var i=Wc.default.performance,e=i&&i.timing;return e!==void 0},domContentLoadedEventEnd:function(){var i=Wc.default.performance,e=i&&i.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var i=Wc.default.performance,e=i&&i.timing;return e&&e.navigationStart}},Od=X_;function We(i,e,t){t=t===void 0?1:t,i[e]=i[e]||0,i[e]+=t}function Pd(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},s=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(t).filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),s.forEach(function(r){B(i,r,t[r])})}return i}function Q_(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);t.push.apply(t,s)}return t}function nm(i,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Q_(Object(e)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}),i}var Z_=["x-cdn","content-type"],mv=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],J_=Z_.concat(mv);function am(i){i=i||"";var e={},t=i.trim().split(/[\r\n]+/);return t.forEach(function(s){if(s){var r=s.split(": "),n=r.shift();n&&(J_.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function Nd(i){if(i){var e=mv.find(function(t){return i[t]!==void 0});return e?i[e]:void 0}}var e1=function(i){var e={};for(var t in i){var s=i[t],r=s["DATA-ID"].search("io.litix.data.");if(r!==-1){var n=s["DATA-ID"].replace("io.litix.data.","");e[n]=s.VALUE}}return e},pv=e1,Eo=function(i){if(!i)return{};var e=Od.navigationStart(),t=i.loading,s=t?t.start:i.trequest,r=t?t.first:i.tfirst,n=t?t.end:i.tload;return{bytesLoaded:i.total,requestStart:Math.round(e+s),responseStart:Math.round(e+r),responseEnd:Math.round(e+n)}},Wn=function(i){if(!(!i||typeof i.getAllResponseHeaders!="function"))return am(i.getAllResponseHeaders())},t1=function(i,e,t){var s=arguments.length>4?arguments[4]:void 0,r=i.log,n=i.utils.secondsToMs,a=function(g){var v=parseInt(s.version),y;return v===1&&g.programDateTime!==null&&(y=g.programDateTime),v===0&&g.pdt!==null&&(y=g.pdt),y};if(!Od.exists()){r.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(g,v){return i.emit(e,g,v)},l=function(g,v){var y=v.levels,b=v.audioTracks,x=v.url,_=v.stats,S=v.networkDetails,A=v.sessionData,D={},O={};y.forEach(function(q,Y){D[Y]={width:q.width,height:q.height,bitrate:q.bitrate,attrs:q.attrs}}),b.forEach(function(q,Y){O[Y]={name:q.name,language:q.lang,bitrate:q.bitrate}});var L=Eo(_),C=L.bytesLoaded,H=L.requestStart,U=L.responseStart,Q=L.responseEnd;o("requestcompleted",nm(Pd({},pv(A)),{request_event_type:g,request_bytes_loaded:C,request_start:H,request_response_start:U,request_response_end:Q,request_type:"manifest",request_hostname:Jt(x),request_response_headers:Wn(S),request_rendition_lists:{media:D,audio:O,video:{}}}))};t.on(s.Events.MANIFEST_LOADED,l);var d=function(g,v){var y=v.details,b=v.level,x=v.networkDetails,_=v.stats,S=Eo(_),A=S.bytesLoaded,D=S.requestStart,O=S.responseStart,L=S.responseEnd,C=y.fragments[y.fragments.length-1],H=a(C)+n(C.duration);o("requestcompleted",{request_event_type:g,request_bytes_loaded:A,request_start:D,request_response_start:O,request_response_end:L,request_current_level:b,request_type:"manifest",request_hostname:Jt(y.url),request_response_headers:Wn(x),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(H)?void 0:H})};t.on(s.Events.LEVEL_LOADED,d);var c=function(g,v){var y=v.details,b=v.networkDetails,x=v.stats,_=Eo(x),S=_.bytesLoaded,A=_.requestStart,D=_.responseStart,O=_.responseEnd;o("requestcompleted",{request_event_type:g,request_bytes_loaded:S,request_start:A,request_response_start:D,request_response_end:O,request_type:"manifest",request_hostname:Jt(y.url),request_response_headers:Wn(b)})};t.on(s.Events.AUDIO_TRACK_LOADED,c);var u=function(g,v){var y=v.stats,b=v.networkDetails,x=v.frag;y=y||x.stats;var _=Eo(y),S=_.bytesLoaded,A=_.requestStart,D=_.responseStart,O=_.responseEnd,L=b?Wn(b):void 0,C={request_event_type:g,request_bytes_loaded:S,request_start:A,request_response_start:D,request_response_end:O,request_hostname:b?Jt(b.responseURL):void 0,request_id:L?Nd(L):void 0,request_response_headers:L,request_media_duration:x.duration,request_url:b==null?void 0:b.responseURL};x.type==="main"?(C.request_type="media",C.request_current_level=x.level,C.request_video_width=(t.levels[x.level]||{}).width,C.request_video_height=(t.levels[x.level]||{}).height,C.request_labeled_bitrate=(t.levels[x.level]||{}).bitrate):C.request_type=x.type,o("requestcompleted",C)};t.on(s.Events.FRAG_LOADED,u);var h=function(g,v){var y=v.frag,b=y.start,x=a(y),_={currentFragmentPDT:x,currentFragmentStart:n(b)};o("fragmentchange",_)};t.on(s.Events.FRAG_CHANGED,h);var f=function(g,v){var y=v.type,b=v.details,x=v.response,_=v.fatal,S=v.frag,A=v.networkDetails,D=(S==null?void 0:S.url)||v.url||"",O=A?Wn(A):void 0;if((b===s.ErrorDetails.MANIFEST_LOAD_ERROR||b===s.ErrorDetails.MANIFEST_LOAD_TIMEOUT||b===s.ErrorDetails.FRAG_LOAD_ERROR||b===s.ErrorDetails.FRAG_LOAD_TIMEOUT||b===s.ErrorDetails.LEVEL_LOAD_ERROR||b===s.ErrorDetails.LEVEL_LOAD_TIMEOUT||b===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||b===s.ErrorDetails.SUBTITLE_LOAD_ERROR||b===s.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||b===s.ErrorDetails.KEY_LOAD_ERROR||b===s.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:b,request_url:D,request_hostname:Jt(D),request_id:O?Nd(O):void 0,request_type:b===s.ErrorDetails.FRAG_LOAD_ERROR||b===s.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":b===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||b===s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":b===s.ErrorDetails.SUBTITLE_LOAD_ERROR||b===s.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":b===s.ErrorDetails.KEY_LOAD_ERROR||b===s.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:x==null?void 0:x.code,request_error_text:x==null?void 0:x.text}),_){var L,C="".concat(D?"url: ".concat(D,`
3
3
  `):"")+"".concat(x&&(x.code||x.text)?"response: ".concat(x.code,", ").concat(x.text,`
4
4
  `):"")+"".concat(v.reason?"failure reason: ".concat(v.reason,`
@@ -2985,4 +2985,4 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2985
2985
  </template>
2986
2986
  `,zf=As.createElement("template");"innerHTML"in zf&&(zf.innerHTML=qM);var zg,Xg,JT=class extends go{};JT.template=(Xg=(zg=zf.content)==null?void 0:zg.children)==null?void 0:Xg[0];lt.customElements.get("media-theme-gerwig")||lt.customElements.define("media-theme-gerwig",JT);var YM="gerwig",qi={SRC:"src",POSTER:"poster"},$={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",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"},Xf=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function jM(i,e){var t;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute($.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:zM(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute($.NOHOTKEYS),hotKeys:i.getAttribute($.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:_p(i.getAttribute(P.STREAM_TYPE)),primaryColor:i.getAttribute($.PRIMARY_COLOR),secondaryColor:i.getAttribute($.SECONDARY_COLOR),accentColor:i.getAttribute($.ACCENT_COLOR),forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultDuration:i.defaultDuration,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:XM(i),playbackRates:i.getAttribute($.PLAYBACK_RATES),customDomain:(t=i.getAttribute(P.CUSTOM_DOMAIN))!=null?t:void 0,title:i.getAttribute($.TITLE),novolumepref:i.hasAttribute($.NO_VOLUME_PREF),...e,extraSourceParams:i.extraSourceParams}}function zM(i){var e,t;let s=i.theme;if(s){let r=(t=(e=i.getRootNode())==null?void 0:e.getElementById)==null?void 0:t.call(e,s);if(r&&r instanceof HTMLTemplateElement)return r;s.startsWith("media-theme-")||(s=`media-theme-${s}`);let n=lt.customElements.get(s);if(n!=null&&n.template)return n.template}}function XM(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 Qg(i){let e=i.hasAttribute($.TITLE)?{video_title:i.getAttribute($.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,s)=>{let r=i.getAttribute(s);return r!==null&&(t[s.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},e)}var QM=Object.values(P),ZM=Object.values(qi),JM=Object.values($),e2=WT(),t2="mux-player",Zg={dialog:void 0,isDialogOpen:!1},i2={redundant_streams:!0},Rd,wd,Js,Cd,In,Yi,fs,Qf,e_,Ac,Zf,tr,hn,Jf,Jg,em,ev,tm,tv,im,iv,sv=class extends Vg{constructor(){super(),ht(this,Yi),ht(this,Qf),ht(this,Ac),ht(this,tr),ht(this,Jf),ht(this,em),ht(this,tm),ht(this,im),ht(this,Rd,!1),ht(this,wd,{}),ht(this,Js,!0),ht(this,Cd,new _M(this,"hotkeys")),ht(this,In,{...Zg,onCloseErrorDialog:()=>ze(this,Ac,Zf).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{GT(this,As.activeElement)||e.preventDefault()}}),this.attachShadow({mode:"open"}),ze(this,Qf,e_).call(this),this.isConnected&&ze(this,Yi,fs).call(this)}static get observedAttributes(){var e;return[...(e=Vg.observedAttributes)!=null?e:[],...ZM,...QM,...JM]}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=Qg(this))}attributeChangedCallback(e,t,s){switch(ze(this,Yi,fs).call(this),super.attributeChangedCallback(e,t,s),e){case $.HOTKEYS:Te(this,Cd).value=s;break;case $.THUMBNAIL_TIME:{s!=null&&this.tokens.thumbnail&&cr(fe("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case $.THUMBNAIL_TOKEN:{let{aud:r}=lo(s);s&&r!=="t"&&cr(fe("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:r}));break}case $.STORYBOARD_TOKEN:{let{aud:r}=lo(s);s&&r!=="s"&&cr(fe("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:r}));break}case P.PLAYBACK_ID:{s!=null&&s.includes("?token")&&ri(fe("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:s}));break}case P.STREAM_TYPE:s&&![_e.LIVE,_e.ON_DEMAND,_e.UNKNOWN].includes(s)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=s.includes("dvr")?Number.POSITIVE_INFINITY:0:VT({file:"invalid-stream-type.md",message:fe("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):s===_e.LIVE?this.getAttribute($.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[P.PLAYBACK_ID,qi.SRC,$.PLAYBACK_TOKEN].includes(e)&&t!==s&&Zi(this,In,{...Te(this,In),...Zg}),ze(this,tr,hn).call(this,{[TM(e)]:s})}get preferCmcd(){var e;return(e=this.getAttribute(P.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?jd.includes(e)?this.setAttribute(P.PREFER_CMCD,e):cr(`Invalid value for preferCmcd. Must be one of ${jd.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($.THEME))!=null?e:YM}set theme(e){this.setAttribute($.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let s of e.getAttributeNames()){if(Xf.includes(s))continue;let r=e.getAttribute(s);t[$T(s)]=r===""?!0:r}return t}set themeProps(e){var t,s;ze(this,Yi,fs).call(this);let r={...this.themeProps,...e};for(let n in r){if(Xf.includes(n))continue;let a=e==null?void 0:e[n];typeof a=="boolean"||a==null?(t=this.mediaTheme)==null||t.toggleAttribute(qf(n),!!a):(s=this.mediaTheme)==null||s.setAttribute(qf(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=Ds(this,qi.SRC))!=null?e:void 0:(t=this.getAttribute(qi.SRC))!=null?t:void 0}set src(e){e?this.setAttribute(qi.SRC,e):this.removeAttribute(qi.SRC)}get poster(){var e;let t=this.getAttribute(qi.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return EM(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(e=this.thumbnailTime)!=null?e:this.startTime,programTime:this.programStartTime,token:this.tokens.thumbnail})}set poster(e){e||e===""?this.setAttribute(qi.POSTER,e):this.removeAttribute(qi.POSTER)}get storyboardSrc(){var e;return(e=this.getAttribute($.STORYBOARD_SRC))!=null?e:void 0}set storyboardSrc(e){e?this.setAttribute($.STORYBOARD_SRC,e):this.removeAttribute($.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[_e.LIVE,_e.UNKNOWN].includes(this.streamType)))return bM(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute($.AUDIO)}set audio(e){if(!e){this.removeAttribute($.AUDIO);return}this.setAttribute($.AUDIO,"")}get hotkeys(){return Te(this,Cd)}get nohotkeys(){return this.hasAttribute($.NOHOTKEYS)}set nohotkeys(e){if(!e){this.removeAttribute($.NOHOTKEYS);return}this.setAttribute($.NOHOTKEYS,"")}get thumbnailTime(){return xi(this.getAttribute($.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute($.THUMBNAIL_TIME,`${e}`)}get title(){var e;return(e=this.getAttribute($.TITLE))!=null?e:""}set title(e){e!==this.title&&(e?this.setAttribute($.TITLE,e):this.removeAttribute("title"),super.title=e)}get placeholder(){var e;return(e=Ds(this,$.PLACEHOLDER))!=null?e:""}set placeholder(e){this.setAttribute($.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let s=this.getAttribute($.PRIMARY_COLOR);if(s!=null||this.mediaTheme&&(s=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_primary-color"))==null?void 0:t.trim(),s))return s}set primaryColor(e){this.setAttribute($.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let s=this.getAttribute($.SECONDARY_COLOR);if(s!=null||this.mediaTheme&&(s=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_secondary-color"))==null?void 0:t.trim(),s))return s}set secondaryColor(e){this.setAttribute($.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let s=this.getAttribute($.ACCENT_COLOR);if(s!=null||this.mediaTheme&&(s=(t=(e=lt.getComputedStyle(this.mediaTheme))==null?void 0:e.getPropertyValue("--_accent-color"))==null?void 0:t.trim(),s))return s}set accentColor(e){this.setAttribute($.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute($.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute($.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute($.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute($.PLAYBACK_RATES))return this.getAttribute($.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($.PLAYBACK_RATES);return}this.setAttribute($.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return(e=xi(this.getAttribute($.FORWARD_SEEK_OFFSET)))!=null?e:10}set forwardSeekOffset(e){this.setAttribute($.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return(e=xi(this.getAttribute($.BACKWARD_SEEK_OFFSET)))!=null?e:10}set backwardSeekOffset(e){this.setAttribute($.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute($.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute($.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute($.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return xi(this.getAttribute($.DEFAULT_DURATION))}set defaultDuration(e){e==null?this.removeAttribute($.DEFAULT_DURATION):this.setAttribute($.DEFAULT_DURATION,`${e}`)}get playerSoftwareName(){var e;return(e=this.getAttribute(P.PLAYER_SOFTWARE_NAME))!=null?e:t2}get playerSoftwareVersion(){var e;return(e=this.getAttribute(P.PLAYER_SOFTWARE_VERSION))!=null?e:e2}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 xi(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 xi(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($.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute($.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,s])=>(e[t]=s,e),{}):i2}set extraSourceParams(e){e==null?this.removeAttribute($.EXTRA_SOURCE_PARAMS):this.setAttribute($.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=Ds(this,P.ENV_KEY))!=null?e:void 0}set envKey(e){this.setAttribute(P.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute($.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute($.NO_VOLUME_PREF,""):this.removeAttribute($.NO_VOLUME_PREF)}get debug(){return Ds(this,P.DEBUG)!=null}set debug(e){e?this.setAttribute(P.DEBUG,""):this.removeAttribute(P.DEBUG)}get disableTracking(){return Ds(this,P.DISABLE_TRACKING)!=null}set disableTracking(e){this.toggleAttribute(P.DISABLE_TRACKING,!!e)}get disableCookies(){return Ds(this,P.DISABLE_COOKIES)!=null}set disableCookies(e){e?this.setAttribute(P.DISABLE_COOKIES,""):this.removeAttribute(P.DISABLE_COOKIES)}get streamType(){var e,t,s;return(s=(t=this.getAttribute(P.STREAM_TYPE))!=null?t:(e=this.media)==null?void 0:e.streamType)!=null?s:_e.UNKNOWN}set streamType(e){this.setAttribute(P.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,s;return(s=(t=this.getAttribute($.DEFAULT_STREAM_TYPE))!=null?t:(e=this.mediaController)==null?void 0:e.getAttribute($.DEFAULT_STREAM_TYPE))!=null?s:_e.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute($.DEFAULT_STREAM_TYPE,e):this.removeAttribute($.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute($.TARGET_LIVE_WINDOW)?+this.getAttribute($.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($.TARGET_LIVE_WINDOW):this.setAttribute($.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return(e=this.media)==null?void 0:e.liveEdgeStart}get startTime(){return xi(Ds(this,P.START_TIME))}set startTime(e){this.setAttribute(P.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(P.PREFER_PLAYBACK);if(e===Ci.MSE||e===Ci.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Ci.MSE||e===Ci.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(ze(this,Yi,fs).call(this),!this.media){ri("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Qg(this),...e}}get _hlsConfig(){var e;return(e=this.media)==null?void 0:e._hlsConfig}set _hlsConfig(e){if(ze(this,Yi,fs).call(this),!this.media){ri("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(ze(this,Yi,fs).call(this),!this.media){ri("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(ze(this,Yi,fs).call(this),!this.media){ri("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($.PLAYBACK_TOKEN),t=this.getAttribute($.THUMBNAIL_TOKEN),s=this.getAttribute($.STORYBOARD_TOKEN);return{...Te(this,wd),...e!=null?{playback:e}:{},...t!=null?{thumbnail:t}:{},...s!=null?{storyboard:s}:{}}}set tokens(e){Zi(this,wd,e??{})}get playbackToken(){var e;return(e=this.getAttribute($.PLAYBACK_TOKEN))!=null?e:void 0}set playbackToken(e){this.setAttribute($.PLAYBACK_TOKEN,`${e}`)}get thumbnailToken(){var e;return(e=this.getAttribute($.THUMBNAIL_TOKEN))!=null?e:void 0}set thumbnailToken(e){this.setAttribute($.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return(e=this.getAttribute($.STORYBOARD_TOKEN))!=null?e:void 0}set storyboardToken(e){this.setAttribute($.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,s,r){var n;let a=(n=this.media)==null?void 0:n.nativeEl;if(a)return Lm(a,e,t,s,r)}removeTextTrack(e){var t;let s=(t=this.media)==null?void 0:t.nativeEl;if(s)return dI(s,e)}get textTracks(){var e;return(e=this.media)==null?void 0:e.textTracks}};Rd=new WeakMap,wd=new WeakMap,Js=new WeakMap,Cd=new WeakMap,In=new WeakMap,Yi=new WeakSet,fs=function(){var i,e,t;if(!Te(this,Rd)){Zi(this,Rd,!0),ze(this,tr,hn).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof lt.HTMLElement))throw""}catch{ri("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof qD))throw""}catch{ri("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof OR))throw""}catch{ri("<media-controller> failed to upgrade!")}kM(this),ze(this,Jf,Jg).call(this),ze(this,em,ev).call(this),ze(this,tm,tv).call(this),Zi(this,Js,(e=(i=this.mediaController)==null?void 0:i.hasAttribute(ge.USER_INACTIVE))!=null?e:!0),ze(this,im,iv).call(this),(t=this.media)==null||t.addEventListener("streamtypechange",()=>{ze(this,tr,hn).call(this)})}},Qf=new WeakSet,e_=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{}},Ac=new WeakSet,Zf=function(i){Object.assign(Te(this,In),i),ze(this,tr,hn).call(this)},tr=new WeakSet,hn=function(i={}){BM(GM(jM(this,{...Te(this,In),...i})),this.shadowRoot)},Jf=new WeakSet,Jg=function(){let i=e=>{var t,s;if(!(e!=null&&e.startsWith("theme-")))return;let r=e.replace(/^theme-/,"");if(Xf.includes(r))return;let n=this.getAttribute(e);n!=null?(t=this.mediaTheme)==null||t.setAttribute(r,n):(s=this.mediaTheme)==null||s.removeAttribute(r)};new MutationObserver(e=>{for(let{attributeName:t}of e)i(t)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},em=new WeakSet,ev=function(){var i;let e=t=>{let{detail:s}=t;if(s instanceof Ct||(s=new Ct(s.message,s.code,s.fatal)),!(s!=null&&s.fatal)){cr(s),s.data&&cr(`${s.name} data:`,s.data);return}let{dialog:r,devlog:n}=jf(s,!window.navigator.onLine,this.playbackId,this.playbackToken);n.message&&VT(n),ri(s),s.data&&ri(`${s.name} data:`,s.data),ze(this,Ac,Zf).call(this,{isDialogOpen:!0,dialog:r})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(t={})=>{var s,r,n;if(!(((s=this.media)==null?void 0:s.error)instanceof Ct))return t;let{devlog:a}=jf((r=this.media)==null?void 0:r.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 s,r;let{detail:n}=t;if(!n){let{message:a,code:o}=(r=(s=this.media)==null?void 0:s.error)!=null?r:{};n=new Ct(a,o)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},tm=new WeakSet,tv=function(){var i,e,t,s;let r=()=>ze(this,tr,hn).call(this);(e=(i=this.media)==null?void 0:i.textTracks)==null||e.addEventListener("addtrack",r),(s=(t=this.media)==null?void 0:t.textTracks)==null||s.addEventListener("removetrack",r)},im=new WeakSet,iv=function(){var i,e;if(!/Firefox/i.test(navigator.userAgent))return;let t,s=new WeakMap,r=()=>this.streamType===_e.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,c=!1)=>{r()||Array.from(l&&l.activeCues||[]).forEach(u=>{if(!(!u.snapToLines||u.line<-5||u.line>=0&&u.line<10))if(!d||this.paused){let h=u.text.split(`
2987
2987
  `).length,f=-3;this.streamType===_e.LIVE&&(f=-2);let m=f-h;if(u.line===m&&!c)return;s.has(u)||s.set(u,u.line),u.line=m}else setTimeout(()=>{u.line=s.get(u)||"auto"},500)})},a=()=>{var l,d;n(t,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(ge.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let c=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(u=>["subtitles","captions"].includes(u.kind)&&u.mode==="showing")[0];c!==t&&(t==null||t.removeEventListener("cuechange",a)),t=c,t==null||t.addEventListener("cuechange",a),n(t,Te(this,Js))};o(),(i=this.textTracks)==null||i.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let c=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(ge.USER_INACTIVE))!=null?d:!0;Te(this,Js)!==c&&(Zi(this,Js,c),n(t,Te(this,Js)))})};function Ds(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}lt.customElements.get("mux-player")||(lt.customElements.define("mux-player",sv),lt.MuxPlayerElement=sv);var rv={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},s2=i=>i==null,r2=(i,e)=>s2(e)?!1:i in e,n2=i=>i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),a2=(i,e)=>{if(!(typeof e=="boolean"&&!e)){if(r2(i,rv))return rv[i];if(typeof e!=null)return/[A-Z]/.test(i)?n2(i):i}},o2=(i,e)=>typeof i=="boolean"?"":i,l2=(i={})=>Object.entries(i).reduce((e,[t,s])=>{let r=a2(t,s);if(!r)return e;let n=o2(s);return e[r]=n,e},{}),d2=(...i)=>{let e=pt.useRef(null);return pt.useEffect(()=>{i.forEach(t=>{t&&(typeof t=="function"?t(e.current):t.current=e.current)})},[i]),e},c2=Object.prototype.hasOwnProperty,u2=(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((r,n)=>e[n]===r);let t=Object.keys(i),s=Object.keys(e);if(t.length!==s.length)return!1;for(let r=0;r<t.length;r++)if(!c2.call(e,t[r])||!Object.is(i[t[r]],e[t[r]]))return!1;return!0},t_=(i,e,t)=>!u2(e,i[t]),h2=(i,e,t)=>{i[t]=e},f2=(i,e,t,s=h2,r=t_)=>pt.useEffect(()=>{let n=t==null?void 0:t.current;n&&r(n,e,i)&&s(n,e,i)},[t==null?void 0:t.current,e]),Wi=f2,m2=()=>{try{return"2.7.0"}catch{}return"UNKNOWN"},p2=m2(),g2=()=>p2,v2=Dd.forwardRef(({children:i,...e},t)=>Dd.createElement("mux-player",l2({...e,ref:t}),i)),ke=(i,e,t)=>pt.useEffect(()=>{let s=e==null?void 0:e.current;if(!(!s||!t))return s.addEventListener(i,t),()=>{s.removeEventListener(i,t)}},[e==null?void 0:e.current,t]),E2=(i,e)=>{let{onAbort:t,onCanPlay:s,onCanPlayThrough:r,onEmptied:n,onLoadStart:a,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:c,onVolumeChange:u,onRateChange:h,onResize:f,onWaiting:m,onPlay:p,onPlaying:g,onTimeUpdate:v,onPause:y,onSeeking:b,onSeeked:x,onStalled:_,onSuspend:S,onEnded:A,onError:D,onCuePointChange:O,onCuePointsChange:L,onChapterChange:C,metadata:H,tokens:U,paused:Q,playbackId:q,playbackRates:Y,currentTime:oe,themeProps:ae,extraSourceParams:G,_hlsConfig:F,...re}=e;return Wi("playbackRates",Y,i),Wi("metadata",H,i),Wi("extraSourceParams",G,i),Wi("_hlsConfig",F,i),Wi("themeProps",ae,i),Wi("tokens",U,i),Wi("playbackId",q,i),Wi("paused",Q,i,(J,de)=>{de!=null&&(de?J.pause():J.play())},(J,de,Ae)=>J.hasAttribute("autoplay")&&!J.hasPlayed?!1:t_(J,de,Ae)),Wi("currentTime",oe,i,(J,de)=>{de!=null&&(J.currentTime=de)}),ke("abort",i,t),ke("canplay",i,s),ke("canplaythrough",i,r),ke("emptied",i,n),ke("loadstart",i,a),ke("loadeddata",i,o),ke("loadedmetadata",i,l),ke("progress",i,d),ke("durationchange",i,c),ke("volumechange",i,u),ke("ratechange",i,h),ke("resize",i,f),ke("waiting",i,m),ke("play",i,p),ke("playing",i,g),ke("timeupdate",i,v),ke("pause",i,y),ke("seeking",i,b),ke("seeked",i,x),ke("stalled",i,_),ke("suspend",i,S),ke("ended",i,A),ke("error",i,D),ke("cuepointchange",i,O),ke("cuepointschange",i,L),ke("chapterchange",i,C),[re]},b2=g2(),y2="mux-player-react",T2=Dd.forwardRef((i,e)=>{let t=pt.useRef(null),s=d2(t,e),[r]=E2(t,i);return Dd.createElement(v2,{ref:s,playerSoftwareName:y2,playerSoftwareVersion:b2,...r})}),_2=T2;const A2=Gc.object({time:Gc.number(),expiresAt:Gc.string()}).transform(i=>({time:Number(i.time),expiresAt:new Date(i.expiresAt)}));function S2(){var e;const i=v_("root");return((e=i==null?void 0:i.preferences)==null?void 0:e.player)??null}const x2=["input","select","button","textarea","mux-player","summary"];function nv(i){const e=pt.useRef(i);return pt.useEffect(()=>{e.current=i},[i]),e}function k2({muxPlayerRef:i,...e}){const t=S2(),s=g_(),[r,n]=pt.useState(!1),a=`${e.playbackId}:currentTime`,[o,l]=pt.useState(0),d=nv(s),c=nv(t);pt.useEffect(()=>{if(typeof document>"u")return;const h=sessionStorage.getItem(a);if(h)try{const{time:f,expiresAt:m}=A2.parse(JSON.parse(h));if(m.getTime()<Date.now())throw new Error("Time expired");l(f)}catch{sessionStorage.removeItem(a)}},[a]),pt.useEffect(()=>{function h(f){if(!i.current)return;const m=document.activeElement,p=m instanceof HTMLElement?m.contentEditable==="true":!1;m&&!x2.includes(m.tagName.toLowerCase())&&!p&&(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 u=f_(()=>{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"}};sm(m,c.current)||d.current.submit(m,{method:"POST",action:"/video-player",encType:"application/json"})},300);return pt.useEffect(()=>{var m,p;if(!r)return;const h=(m=i.current)==null?void 0:m.textTracks;if(!h)return;const f=(p=c.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",u),()=>{h.removeEventListener("change",u)}},[r,i,c,u]),W.jsx("div",{className:"flex aspect-video flex-col",children:W.jsx(_2,{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:u,onVolumeChange:u,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 sm(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 r=0;r<i.length;r++)if(!sm(i[r],e[r]))return!1;return!0}const t=Object.keys(i),s=Object.keys(e);if(t.length!==s.length)return!1;for(const r of t)if(!sm(i[r],e[r]))return!1;return!0}const i_=pt.createContext(null);function aO({children:i,epicVideoInfosPromise:e}){return W.jsx(i_.Provider,{value:e,children:i})}function s_(i){let e=new URL("https://epicweb.dev");try{e=new URL(i)}catch(u){return console.error(u),"EpicWeb.dev Video"}const t=e.pathname.split("/").filter(Boolean),s=t.includes("solution");let r=t.pop();const n=["problem","solution","embed","exercise"],a=u=>u&&!n.includes(u);for(;!a(r);)r=t.pop();if(!r)return"EpicWeb.dev Video";const o=r.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"],c=o.filter(Boolean).map((u,h)=>{var p;const f=u.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 s?`${c} (🏁 solution)`:c}function L2({url:i,title:e="Video Embed",loadingContent:t=W.jsx(rm,{children:W.jsxs("span",{children:['Loading "',e,'"']})})}){const[s,r]=pt.useState(!1);return W.jsxs("div",{className:"relative aspect-video w-full flex-shrink-0 shadow-lg dark:shadow-gray-800",children:[s?null:W.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:t}),W.jsx("iframe",{onLoad:()=>r(!0),onError:()=>r(!0),src:i,className:m_("absolute inset-0 flex h-full w-full transition-opacity duration-300",s?"opacity-100":"opacity-0"),title:e,sandbox:"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",allowFullScreen:!0})]})}function r_({url:i,title:e}){return W.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:[W.jsx(p_,{className:"flex-shrink-0",name:"Video",size:"lg"}),e," ",W.jsx("span",{"aria-hidden":!0,children:"↗︎"})]})}function oO({url:i,title:e=s_(i)}){const{product:{host:t,displayName:s}}=y_(),r=b_(),n=pt.useContext(i_),a=W.jsx("div",{children:W.jsx(r_,{url:i,title:e})});return W.jsx("div",{children:W.jsx(pt.Suspense,{fallback:W.jsxs("div",{children:[W.jsx("div",{className:"flex aspect-video w-full items-center justify-center",children:W.jsx(rm,{children:e})}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsx("div",{className:"h-[32px]"})]})]}),children:W.jsx(E_,{errorElement:W.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?W.jsxs("div",{children:[W.jsx(vo,{to:ENV.EPICSHOP_GITHUB_REPO,className:"underline",children:"Run locally"})," for transcripts"]}):W.jsxs("div",{children:[W.jsx(vo,{to:"/login",className:"underline",children:r?"Upgrade":"Login"})," for transcripts"]});if(!l)return W.jsxs("div",{children:[W.jsx(na,{url:i,title:e}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,d]})]});const c=l;return c.status==="success"?W.jsx(I2,{url:i,title:e,muxPlaybackId:c.muxPlaybackId,transcript:c.transcript}):c.type==="region-restricted"?W.jsxs("div",{children:[W.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:[W.jsx("div",{className:"!text-foreground-danger",children:"Error: Region Restricted"}),W.jsxs("div",{children:["We've detected you're connecting from"," ",c.requestCountry," but your license has restricted access to ",c.restrictedCountry]}),W.jsxs("div",{children:["To continue watching uninterrupted, please"," ",W.jsxs("a",{href:`https://${t}/products`,className:"underline",children:["upgrade your ",s," license"]})," ","to a full Pro license."]})]}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsxs("div",{children:[W.jsx(vo,{to:`https://${t}/products`,className:"underline",children:"Upgrade"})," for transcripts"]})]})]}):c.statusCode===401?W.jsxs("div",{children:[W.jsx(na,{url:i,title:e}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,d]})]}):c.statusCode===403?W.jsxs("div",{children:[W.jsx(na,{url:i,title:e}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsxs("div",{children:[W.jsx(vo,{to:`https://${t}/products`,className:"underline",children:"Upgrade"})," for transcripts"]})]})]}):c.statusCode===404?W.jsxs("div",{children:[W.jsx(na,{url:i,title:e}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsx("div",{children:"Transcripts not found"})]})]}):(console.error(c),W.jsxs("div",{children:[W.jsx(na,{url:i,title:e}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsx("div",{className:"!text-foreground-danger",children:"Unknown error (check console)"})]})]}))}})})})}function I2({url:i,title:e=s_(i),muxPlaybackId:t,transcript:s}){const r=pt.useRef(null),n=/(\d+:\d+)/g,a=[];let o,l=0;for(;o=n.exec(s);){const d=o[1];if(!n.lastIndex||!d)break;const c=o.index,u=n.lastIndex,h=s.slice(l+1,c-1);a.push(W.jsx("span",{children:h},c)),a.push(W.jsx("button",{className:"underline",onClick:f=>{r.current&&(r.current.currentTime=R2(d),r.current.play(),r.current.scrollIntoView({behavior:"smooth",inline:"center",block:"start"}),f.currentTarget.blur())},children:d},d)),l=u}return a.push(W.jsx("span",{children:s.slice(l+1,s.length)},s.length)),W.jsxs("div",{children:[W.jsx("div",{className:"shadow-lg dark:shadow-gray-800",children:W.jsx(k2,{playbackId:t,muxPlayerRef:r,title:e})}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[W.jsx(r_,{url:i,title:e}),W.jsxs("details",{children:[W.jsx("summary",{children:"Transcript"}),W.jsx("div",{className:"whitespace-pre-line rounded-md bg-accent p-2 text-accent-foreground",children:a})]})]})]})}function R2(i){const e=i.split(":");let t=0,s=1;for(;e.length>0;)t+=s*parseInt(e.pop()??"0",10),s*=60;return t}function na({url:i,title:e}){const t=h_();let s=new URL("https://epicweb.dev");try{s=new URL(i)}catch(r){return console.error(r),W.jsxs("div",{children:['Invalid URL: "',i,'"']})}return s.pathname=s.pathname.endsWith("/")?`${s.pathname}embed`:`${s.pathname}/embed`,s.searchParams.set("theme",t),W.jsx(L2,{url:s.toString(),title:e,loadingContent:W.jsx(rm,{children:W.jsxs("span",{children:['Loading "',W.jsx("a",{className:"underline",href:i,children:e}),'"']})})})}export{oO as D,aO as E,L2 as V};
2988
- //# sourceMappingURL=epic-video-BFcdejfC.js.map
2988
+ //# sourceMappingURL=epic-video-DZzPuXR8.js.map