@epic-web/workshop-app 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_-D0Tgngwe.js → _-ZHCWB__B.js} +2 -2
- package/build/client/assets/{_-D0Tgngwe.js.map → _-ZHCWB__B.js.map} +1 -1
- package/build/client/assets/_exerciseNumber-BFTlBdr4.js +2 -0
- package/build/client/assets/_exerciseNumber-BFTlBdr4.js.map +1 -0
- package/build/client/assets/{_exerciseNumber_._stepNumber-7kSd_6hH.js → _exerciseNumber_._stepNumber-_687iGFh.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-7kSd_6hH.js.map → _exerciseNumber_._stepNumber-_687iGFh.js.map} +1 -1
- package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js +2 -0
- package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js.map +1 -0
- package/build/client/assets/{_layout-BwzhY4NI.js → _layout-BLJr2x2F.js} +2 -2
- package/build/client/assets/{_layout-BwzhY4NI.js.map → _layout-BLJr2x2F.js.map} +1 -1
- package/build/client/assets/_layout-BriOqd2R.js +2 -0
- package/build/client/assets/_layout-BriOqd2R.js.map +1 -0
- package/build/client/assets/{_layout-BUs3av-e.js → _layout-Cfbi6StB.js} +2 -2
- package/build/client/assets/{_layout-BUs3av-e.js.map → _layout-Cfbi6StB.js.map} +1 -1
- package/build/client/assets/_layout-frPHZWgR.js +6 -0
- package/build/client/assets/_layout-frPHZWgR.js.map +1 -0
- package/build/client/assets/{accordion-OfO-5m5D.js → accordion-DuE9VejZ.js} +2 -2
- package/build/client/assets/{accordion-OfO-5m5D.js.map → accordion-DuE9VejZ.js.map} +1 -1
- package/build/client/assets/{account-BatJhmSV.js → account-DDuV9rZX.js} +2 -2
- package/build/client/assets/{account-BatJhmSV.js.map → account-DDuV9rZX.js.map} +1 -1
- package/build/client/assets/app-wbMCZEiv.js +2 -0
- package/build/client/assets/{app-CJ9ElQg6.js.map → app-wbMCZEiv.js.map} +1 -1
- package/build/client/assets/{button-EE0aPg10.js → button-CMkJ8p0a.js} +2 -2
- package/build/client/assets/{button-EE0aPg10.js.map → button-CMkJ8p0a.js.map} +1 -1
- package/build/client/assets/{components-CME-nGId.js → components-DZ8XIeZ3.js} +2 -2
- package/build/client/assets/{components-CME-nGId.js.map → components-DZ8XIeZ3.js.map} +1 -1
- package/build/client/assets/diff-B6thd_Sf.js +2 -0
- package/build/client/assets/diff-B6thd_Sf.js.map +1 -0
- package/build/client/assets/diff-BEk79KPK.js +2 -0
- package/build/client/assets/{diff-Cvtc-qzL.js.map → diff-BEk79KPK.js.map} +1 -1
- package/build/client/assets/{discord-BRTW4Rnh.js → discord-C9bVfiZ6.js} +2 -2
- package/build/client/assets/{discord-BRTW4Rnh.js.map → discord-C9bVfiZ6.js.map} +1 -1
- package/build/client/assets/discord-DYeU0QX6.js +2 -0
- package/build/client/assets/discord-DYeU0QX6.js.map +1 -0
- package/build/client/assets/{entry.client-3M2p-8I3.js → entry.client-CW5CUf_W.js} +2 -2
- package/build/client/assets/{entry.client-3M2p-8I3.js.map → entry.client-CW5CUf_W.js.map} +1 -1
- package/build/client/assets/{epic-video-yrWoJVFy.js → epic-video-bs7WmhbC.js} +2 -2
- package/build/client/assets/{epic-video-yrWoJVFy.js.map → epic-video-bs7WmhbC.js.map} +1 -1
- package/build/client/assets/{error-boundary-COkPRBOZ.js → error-boundary-BcGxKpte.js} +2 -2
- package/build/client/assets/{error-boundary-COkPRBOZ.js.map → error-boundary-BcGxKpte.js.map} +1 -1
- package/build/client/assets/finished-C2dgX1d-.js +2 -0
- package/build/client/assets/finished-C2dgX1d-.js.map +1 -0
- package/build/client/assets/{index-BwhlO_gF.js → index-BczhSZ3e.js} +2 -2
- package/build/client/assets/{index-BwhlO_gF.js.map → index-BczhSZ3e.js.map} +1 -1
- package/build/client/assets/{index-CXyf3Reb.js → index-BjNhezSK.js} +2 -2
- package/build/client/assets/{index-CXyf3Reb.js.map → index-BjNhezSK.js.map} +1 -1
- package/build/client/assets/{index-YNIH4TH8.js → index-BvihEwfB.js} +2 -2
- package/build/client/assets/{index-YNIH4TH8.js.map → index-BvihEwfB.js.map} +1 -1
- package/build/client/assets/index-C2yr7Uiu.js +2 -0
- package/build/client/assets/index-C2yr7Uiu.js.map +1 -0
- package/build/client/assets/{index-R-sUGQfT.js → index-CuV1bRbu.js} +2 -2
- package/build/client/assets/{index-R-sUGQfT.js.map → index-CuV1bRbu.js.map} +1 -1
- package/build/client/assets/{index-Dx5GmdYq.js → index-DBrRQJxF.js} +2 -2
- package/build/client/assets/{index-Dx5GmdYq.js.map → index-DBrRQJxF.js.map} +1 -1
- package/build/client/assets/{index-1cKOJFpX.js → index-DF_XBInP.js} +2 -2
- package/build/client/assets/{index-1cKOJFpX.js.map → index-DF_XBInP.js.map} +1 -1
- package/build/client/assets/{index-B-hHvmeV.js → index-YtpQLUzj.js} +2 -2
- package/build/client/assets/{index-B-hHvmeV.js.map → index-YtpQLUzj.js.map} +1 -1
- package/build/client/assets/{loading-sXkYDMsx.js → loading-Br41_Pbf.js} +2 -2
- package/build/client/assets/{loading-sXkYDMsx.js.map → loading-Br41_Pbf.js.map} +1 -1
- package/build/client/assets/{login-Cc73KLYm.js → login-kjV7hrVt.js} +2 -2
- package/build/client/assets/{login-Cc73KLYm.js.map → login-kjV7hrVt.js.map} +1 -1
- package/build/client/assets/manifest-32ad9742.js +1 -0
- package/build/client/assets/{mdx-CpyquP9i.js → mdx-CRxPouxB.js} +2 -2
- package/build/client/assets/{mdx-CpyquP9i.js.map → mdx-CRxPouxB.js.map} +1 -1
- package/build/client/assets/{misc-CxCgA-_O.js → misc-BE75ioh8.js} +2 -2
- package/build/client/assets/{misc-CxCgA-_O.js.map → misc-BE75ioh8.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-g-C0ilNz.js → nav-chevrons-DYiI8EMU.js} +2 -2
- package/build/client/assets/{nav-chevrons-g-C0ilNz.js.map → nav-chevrons-DYiI8EMU.js.map} +1 -1
- package/build/client/assets/{onboarding-B7TLVi2l.js → onboarding-B4Z_yevk.js} +2 -2
- package/build/client/assets/{onboarding-B7TLVi2l.js.map → onboarding-B4Z_yevk.js.map} +1 -1
- package/build/client/assets/{pe-CUZaIcdt.js → pe-CvPIToj6.js} +2 -2
- package/build/client/assets/{pe-CUZaIcdt.js.map → pe-CvPIToj6.js.map} +1 -1
- package/build/client/assets/{presence-Cr--lRCr.js → presence-Dd98AJ_5.js} +2 -2
- package/build/client/assets/{presence-Cr--lRCr.js.map → presence-Dd98AJ_5.js.map} +1 -1
- package/build/client/assets/{preview-C7dtR2VR.js → preview-DZcdG4kw.js} +2 -2
- package/build/client/assets/{preview-C7dtR2VR.js.map → preview-DZcdG4kw.js.map} +1 -1
- package/build/client/assets/{product-BAWG1Vut.js → product-mjsTrqXs.js} +2 -2
- package/build/client/assets/{product-BAWG1Vut.js.map → product-mjsTrqXs.js.map} +1 -1
- package/build/client/assets/{progress-BFm2U-l5.js → progress-Co-59mG2.js} +2 -2
- package/build/client/assets/{progress-BFm2U-l5.js.map → progress-Co-59mG2.js.map} +1 -1
- package/build/client/assets/{progress-bar-D3kudPcr.js → progress-bar-F8_2mvYp.js} +2 -2
- package/build/client/assets/{progress-bar-D3kudPcr.js.map → progress-bar-F8_2mvYp.js.map} +1 -1
- package/build/client/assets/{request-info-CEhUGODY.js → request-info-DGnmXtfj.js} +2 -2
- package/build/client/assets/{request-info-CEhUGODY.js.map → request-info-DGnmXtfj.js.map} +1 -1
- package/build/client/assets/revalidation-ws-DcvYvzyj.js +2 -0
- package/build/client/assets/revalidation-ws-DcvYvzyj.js.map +1 -0
- package/build/client/assets/root-Cl86OUog.js +11 -0
- package/build/client/assets/root-Cl86OUog.js.map +1 -0
- package/build/client/assets/{set-playground-DW0yVaNn.js → set-playground-pMKmtPtz.js} +2 -2
- package/build/client/assets/{set-playground-DW0yVaNn.js.map → set-playground-pMKmtPtz.js.map} +1 -1
- package/build/client/assets/{support-hcqGIpir.js → support-B0E_F4Zh.js} +2 -2
- package/build/client/assets/{support-hcqGIpir.js.map → support-B0E_F4Zh.js.map} +1 -1
- package/build/client/assets/test-B6zIK2V6.js +2 -0
- package/build/client/assets/{test-DbZkv25C.js.map → test-B6zIK2V6.js.map} +1 -1
- package/build/client/assets/{tests-BR7RFlr5.js → tests-BeAEgPAw.js} +2 -2
- package/build/client/assets/{tests-BR7RFlr5.js.map → tests-BeAEgPAw.js.map} +1 -1
- package/build/client/assets/{tooltip-kD4kSf1i.js → tooltip-6-WS-Xux.js} +2 -2
- package/build/client/assets/{tooltip-kD4kSf1i.js.map → tooltip-6-WS-Xux.js.map} +1 -1
- package/build/client/assets/{use-event-source-A_0lEOPX.js → use-event-source-CCGBLG92.js} +2 -2
- package/build/client/assets/{use-event-source-A_0lEOPX.js.map → use-event-source-CCGBLG92.js.map} +1 -1
- package/build/client/assets/{user-DvujSs-t.js → user-Boua6jiU.js} +2 -2
- package/build/client/assets/{user-DvujSs-t.js.map → user-Boua6jiU.js.map} +1 -1
- package/build/client/assets/{workshop-config-CL4F08kr.js → workshop-config-Ce9sSc3I.js} +2 -2
- package/build/client/assets/{workshop-config-CL4F08kr.js.map → workshop-config-Ce9sSc3I.js.map} +1 -1
- package/build/server/index.js +768 -692
- package/build/server/index.js.map +1 -1
- package/dist/server/index.js +83 -34
- package/package.json +4 -4
- package/build/client/assets/_exerciseNumber-1JworToC.js +0 -2
- package/build/client/assets/_exerciseNumber-1JworToC.js.map +0 -1
- package/build/client/assets/_exerciseNumber_.finished-B4D2ZAmj.js +0 -2
- package/build/client/assets/_exerciseNumber_.finished-B4D2ZAmj.js.map +0 -1
- package/build/client/assets/_layout-BPwIOXxN.js +0 -6
- package/build/client/assets/_layout-BPwIOXxN.js.map +0 -1
- package/build/client/assets/_layout-CKnDy_9Z.js +0 -2
- package/build/client/assets/_layout-CKnDy_9Z.js.map +0 -1
- package/build/client/assets/app-CJ9ElQg6.js +0 -2
- package/build/client/assets/diff-Cvtc-qzL.js +0 -2
- package/build/client/assets/diff-jgZ_RGra.js +0 -2
- package/build/client/assets/diff-jgZ_RGra.js.map +0 -1
- package/build/client/assets/discord-BhzUjmbI.js +0 -2
- package/build/client/assets/discord-BhzUjmbI.js.map +0 -1
- package/build/client/assets/finished-Ct6I1SZV.js +0 -2
- package/build/client/assets/finished-Ct6I1SZV.js.map +0 -1
- package/build/client/assets/index-Ccssehd9.js +0 -2
- package/build/client/assets/index-Ccssehd9.js.map +0 -1
- package/build/client/assets/manifest-f5f44d87.js +0 -1
- package/build/client/assets/root-9wVBEzOq.js +0 -68
- package/build/client/assets/root-9wVBEzOq.js.map +0 -1
- package/build/client/assets/test-DbZkv25C.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 f_}from"./index-YNIH4TH8.js";import{z as Gc}from"./request-info-CEhUGODY.js";import{f as m_,a as p_,I as g_}from"./misc-CxCgA-_O.js";import{a as v_,e as E_,A as b_,L as vo}from"./components-CME-nGId.js";import{L as sm}from"./loading-sXkYDMsx.js";import{c as y_}from"./user-DvujSs-t.js";import{u as T_}from"./workshop-config-CL4F08kr.js";var __=Object.create,ov=Object.defineProperty,A_=Object.getOwnPropertyDescriptor,S_=Object.getOwnPropertyNames,x_=Object.getPrototypeOf,k_=Object.prototype.hasOwnProperty,lv=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}},L_=function(i,e,t,r){if(e&&typeof e=="object"||typeof e=="function")for(var s=S_(e),n=0,a=s.length,o;n<a;n++)o=s[n],!k_.call(i,o)&&o!==t&&ov(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(r=A_(e,o))||r.enumerable});return i},Dt=function(i,e,t){return t=i!=null?__(x_(i)):{},L_(!i||!i.__esModule?ov(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=lv(function(){}),I_=vt(function(i,e){Sc(),function(t,r){typeof define=="function"&&define.amd?define(r):typeof e=="object"&&e.exports?e.exports=r():t.log=r()}(i,function(){var t=function(){},r="undefined",s=(typeof window>"u"?"undefined":yt(window))!==r&&yt(window.navigator)!==r&&/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))===r?!1:g==="trace"&&s?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))!==r&&(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))===r||!_)){try{window.localStorage[_]=C;return}catch{}try{window.document.cookie=encodeURIComponent(_)+"="+C+";"}catch{}}}function A(){var L;if(!((typeof window>"u"?"undefined":yt(window))===r||!_)){try{L=window.localStorage[_]}catch{}if((typeof L>"u"?"undefined":yt(L))===r)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))===r||!_)){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))===r&&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))!==r?window.log:void 0;return f.noConflict=function(){return(typeof window>"u"?"undefined":yt(window))!==r&&window.log===f&&(window.log=p),f},f.getLoggers=function(){return m},f.default=f,f})});function ks(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):ks(i,e)}var Ls=lv(function(){Ls()}),R_=vt(function(i){var e=Object.prototype.hasOwnProperty,t;function r(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function s(o){try{return encodeURIComponent(o)}catch{return null}}function n(o){for(var l=/([^=?#&]+)=?([^&]*)/g,d={},c;c=l.exec(o);){var u=r(c[1]),h=r(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=s(u),c=s(c),u===null||c===null)continue;d.push(u+"="+c)}return d.length?l+d.join("&"):""}i.stringify=a,i.parse=n}),w_=vt(function(i,e){(function(t){var r=!1;if(typeof define=="function"&&define.amd&&(define(t),r=!0),typeof i=="object"&&(e.exports=t(),r=!0),!r){var s=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=s,n}}})(function(){var t=function(){for(var s=0,n={};s<arguments.length;s++){var a=arguments[s];for(var o in a)n[o]=a[o]}return n};function r(s){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 s.write?o=s.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=s.read?s.read(p,g):s(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=r,n}return r(function(){})})}),dv=vt(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))}}}),C_=vt(function(i,e){Ls(),e.exports=t;function t(r,s){if(!ks(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]"}}),D_=vt(function(i,e){Ls(),e.exports=t;function t(r,s){if(!ks(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}}),cv=vt(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)}}),uv=vt(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)}}),hv=vt(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)}}}),M_=vt(function(i,e){Sc(),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 c(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(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,"&").replace(/</g,"<").replace(/>/g,">")}function u(h){return c(h).replace(/"/g,""")}}),fv=vt(function(i,e){Ls();var t=dv(),r=cv(),s=uv(),n=hv(),a=M_(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,c,u){if(!ks(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=s,l.prototype.dispatchEvent=r,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}}),O_=vt(function(i,e){Ls();var t=fv();e.exports=r;function r(s){if(!ks(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("")}}),P_=vt(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(){}}),N_=vt(function(i,e){Ls();var t=dv(),r=C_(),s=D_(),n=fv(),a=O_(),o=P_(),l=cv(),d=uv(),c=hv();e.exports=u;function u(){if(!ks(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 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=c,h.addEventListener=d,h.dispatchEvent=l}),U_=vt(function(i,e){var t=N_();e.exports=new t}),F_=vt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},r=U_(),s;typeof document<"u"?s=document:(s=t["__GLOBAL_DOCUMENT_CACHE@4"],s||(s=t["__GLOBAL_DOCUMENT_CACHE@4"]=r)),e.exports=s});function $_(i){if(Array.isArray(i))return i}function B_(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 G_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{R as Dd,r as pt,j as W}from"./index-DF_XBInP.js";import{u as f_}from"./index-BvihEwfB.js";import{z as Gc}from"./request-info-DGnmXtfj.js";import{f as m_,a as p_,I as g_}from"./misc-BE75ioh8.js";import{a as v_,e as E_,A as b_,L as vo}from"./components-DZ8XIeZ3.js";import{L as sm}from"./loading-Br41_Pbf.js";import{c as y_}from"./user-Boua6jiU.js";import{u as T_}from"./workshop-config-Ce9sSc3I.js";var __=Object.create,ov=Object.defineProperty,A_=Object.getOwnPropertyDescriptor,S_=Object.getOwnPropertyNames,x_=Object.getPrototypeOf,k_=Object.prototype.hasOwnProperty,lv=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}},L_=function(i,e,t,r){if(e&&typeof e=="object"||typeof e=="function")for(var s=S_(e),n=0,a=s.length,o;n<a;n++)o=s[n],!k_.call(i,o)&&o!==t&&ov(i,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(r=A_(e,o))||r.enumerable});return i},Dt=function(i,e,t){return t=i!=null?__(x_(i)):{},L_(!i||!i.__esModule?ov(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=lv(function(){}),I_=vt(function(i,e){Sc(),function(t,r){typeof define=="function"&&define.amd?define(r):typeof e=="object"&&e.exports?e.exports=r():t.log=r()}(i,function(){var t=function(){},r="undefined",s=(typeof window>"u"?"undefined":yt(window))!==r&&yt(window.navigator)!==r&&/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))===r?!1:g==="trace"&&s?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))!==r&&(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))===r||!_)){try{window.localStorage[_]=C;return}catch{}try{window.document.cookie=encodeURIComponent(_)+"="+C+";"}catch{}}}function A(){var L;if(!((typeof window>"u"?"undefined":yt(window))===r||!_)){try{L=window.localStorage[_]}catch{}if((typeof L>"u"?"undefined":yt(L))===r)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))===r||!_)){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))===r&&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))!==r?window.log:void 0;return f.noConflict=function(){return(typeof window>"u"?"undefined":yt(window))!==r&&window.log===f&&(window.log=p),f},f.getLoggers=function(){return m},f.default=f,f})});function ks(i,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](i):ks(i,e)}var Ls=lv(function(){Ls()}),R_=vt(function(i){var e=Object.prototype.hasOwnProperty,t;function r(o){try{return decodeURIComponent(o.replace(/\+/g," "))}catch{return null}}function s(o){try{return encodeURIComponent(o)}catch{return null}}function n(o){for(var l=/([^=?#&]+)=?([^&]*)/g,d={},c;c=l.exec(o);){var u=r(c[1]),h=r(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=s(u),c=s(c),u===null||c===null)continue;d.push(u+"="+c)}return d.length?l+d.join("&"):""}i.stringify=a,i.parse=n}),w_=vt(function(i,e){(function(t){var r=!1;if(typeof define=="function"&&define.amd&&(define(t),r=!0),typeof i=="object"&&(e.exports=t(),r=!0),!r){var s=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=s,n}}})(function(){var t=function(){for(var s=0,n={};s<arguments.length;s++){var a=arguments[s];for(var o in a)n[o]=a[o]}return n};function r(s){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 s.write?o=s.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=s.read?s.read(p,g):s(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=r,n}return r(function(){})})}),dv=vt(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))}}}),C_=vt(function(i,e){Ls(),e.exports=t;function t(r,s){if(!ks(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]"}}),D_=vt(function(i,e){Ls(),e.exports=t;function t(r,s){if(!ks(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}}),cv=vt(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)}}),uv=vt(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)}}),hv=vt(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)}}}),M_=vt(function(i,e){Sc(),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 c(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(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,"&").replace(/</g,"<").replace(/>/g,">")}function u(h){return c(h).replace(/"/g,""")}}),fv=vt(function(i,e){Ls();var t=dv(),r=cv(),s=uv(),n=hv(),a=M_(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,c,u){if(!ks(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=s,l.prototype.dispatchEvent=r,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}}),O_=vt(function(i,e){Ls();var t=fv();e.exports=r;function r(s){if(!ks(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("")}}),P_=vt(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(){}}),N_=vt(function(i,e){Ls();var t=dv(),r=C_(),s=D_(),n=fv(),a=O_(),o=P_(),l=cv(),d=uv(),c=hv();e.exports=u;function u(){if(!ks(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 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=c,h.addEventListener=d,h.dispatchEvent=l}),U_=vt(function(i,e){var t=N_();e.exports=new t}),F_=vt(function(i,e){var t=typeof global<"u"?global:typeof window<"u"?window:{},r=U_(),s;typeof document<"u"?s=document:(s=t["__GLOBAL_DOCUMENT_CACHE@4"],s||(s=t["__GLOBAL_DOCUMENT_CACHE@4"]=r)),e.exports=s});function $_(i){if(Array.isArray(i))return i}function B_(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 G_(){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,r=new Array(e);t<e;t++)r[t]=i[t];return r}function H_(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 Ts(i,e){return $_(i)||B_(i,e)||H_(i,e)||G_()}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)})},mv=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},Mr=function(i){if(i&&typeof i.nodeName<"u")return i.muxId||(i.muxId=mv()),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=Mr(e)):e=document.querySelector(i);var t=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,i,t]},Va=Dt(I_()),W_=Va.default.methodFactory;Va.default.methodFactory=function(i,e,t){var r=W_(i,e,t);return function(){for(var s=["[mux]"],n=0;n<arguments.length;n++)s.push(arguments[n]);r.apply(void 0,s)}};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 K_=Dt(Ui()),V_={now:function(){var i=K_.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)}},Qe=V_;function ne(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}Ls();function ct(i,e){if(!ks(i,e))throw new TypeError("Cannot call a class as a function")}function q_(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 Fi(i,e,t){return e&&q_(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,r){return t.__proto__=r,t},Vu(i,e)}function Y_(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 j_(){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 z_(i,e){return e&&(yt(e)==="object"||typeof e=="function")?e:ne(i)}function X_(i){var e=j_();return function(){var t=Md(i),r;if(e){var s=Md(this).constructor;r=Reflect.construct(t,arguments,s)}else r=t.apply(this,arguments);return z_(this,r)}}var Jt=function(i){return qa(i)[0]},qa=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]},Wc=Dt(Ui()),Q_={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=Q_;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]:{},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 Z_(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);t.push.apply(t,r)}return t}function nm(i,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Z_(Object(e)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}),i}var J_=["x-cdn","content-type"],pv=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],e1=J_.concat(pv);function am(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&&(e1.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=s.join(": "))}}),e}function Nd(i){if(i){var e=pv.find(function(t){return i[t]!==void 0});return e?i[e]:void 0}}var t1=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},gv=t1,Eo=function(i){if(!i)return{};var e=Od.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)}},Wn=function(i){if(!(!i||typeof i.getAllResponseHeaders!="function"))return am(i.getAllResponseHeaders())},i1=function(i,e,t){var r=arguments.length>4?arguments[4]:void 0,s=i.log,n=i.utils.secondsToMs,a=function(g){var v=parseInt(r.version),y;return v===1&&g.programDateTime!==null&&(y=g.programDateTime),v===0&&g.pdt!==null&&(y=g.pdt),y};if(!Od.exists()){s.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({},gv(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(r.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(r.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(r.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(r.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(r.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===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:D,request_hostname:Jt(D),request_id:O?Nd(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: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=Ar.createElement("template");"innerHTML"in zf&&(zf.innerHTML=YM);var zg,Xg,e_=class extends go{};e_.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",e_);var jM="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 zM(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:XM(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:QM(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 XM(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 QM(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,r)=>{let s=i.getAttribute(r);return s!==null&&(t[r.replace(/^metadata-/,"").replace(/-/g,"_")]=s),t},e)}var ZM=Object.values(P),JM=Object.values(qi),e2=Object.values($),t2=KT(),i2="mux-player",Zg={dialog:void 0,isDialogOpen:!1},r2={redundant_streams:!0},Rd,wd,Jr,Cd,In,Yi,fr,Qf,t_,Ac,Zf,ts,hn,Jf,Jg,em,ev,tm,tv,im,iv,rv=class extends Vg{constructor(){super(),ht(this,Yi),ht(this,Qf),ht(this,Ac),ht(this,ts),ht(this,Jf),ht(this,em),ht(this,tm),ht(this,im),ht(this,Rd,!1),ht(this,wd,{}),ht(this,Jr,!0),ht(this,Cd,new AM(this,"hotkeys")),ht(this,In,{...Zg,onCloseErrorDialog:()=>ze(this,Ac,Zf).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:e=>{HT(this,Ar.activeElement)||e.preventDefault()}}),this.attachShadow({mode:"open"}),ze(this,Qf,t_).call(this),this.isConnected&&ze(this,Yi,fr).call(this)}static get observedAttributes(){var e;return[...(e=Vg.observedAttributes)!=null?e:[],...JM,...ZM,...e2]}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,r){switch(ze(this,Yi,fr).call(this),super.attributeChangedCallback(e,t,r),e){case $.HOTKEYS:Te(this,Cd).value=r;break;case $.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&cs(fe("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case $.THUMBNAIL_TOKEN:{let{aud:s}=lo(r);r&&s!=="t"&&cs(fe("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case $.STORYBOARD_TOKEN:{let{aud:s}=lo(r);r&&s!=="s"&&cs(fe("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case P.PLAYBACK_ID:{r!=null&&r.includes("?token")&&si(fe("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&&![_e.LIVE,_e.ON_DEMAND,_e.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:qT({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})}):r===_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!==r&&Zi(this,In,{...Te(this,In),...Zg}),ze(this,ts,hn).call(this,{[_M(e)]:r})}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):cs(`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:jM}set theme(e){this.setAttribute($.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let r of e.getAttributeNames()){if(Xf.includes(r))continue;let s=e.getAttribute(r);t[BT(r)]=s===""?!0:s}return t}set themeProps(e){var t,r;ze(this,Yi,fr).call(this);let s={...this.themeProps,...e};for(let n in s){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):(r=this.mediaTheme)==null||r.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=Dr(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 bM(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 yM(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=Dr(this,$.PLACEHOLDER))!=null?e:""}set placeholder(e){this.setAttribute($.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let r=this.getAttribute($.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($.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let r=this.getAttribute($.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($.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let r=this.getAttribute($.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($.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:i2}get playerSoftwareVersion(){var e;return(e=this.getAttribute(P.PLAYER_SOFTWARE_VERSION))!=null?e:t2}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,r])=>(e[t]=r,e),{}):r2}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=Dr(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 Dr(this,P.DEBUG)!=null}set debug(e){e?this.setAttribute(P.DEBUG,""):this.removeAttribute(P.DEBUG)}get disableTracking(){return Dr(this,P.DISABLE_TRACKING)!=null}set disableTracking(e){this.toggleAttribute(P.DISABLE_TRACKING,!!e)}get disableCookies(){return Dr(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:_e.UNKNOWN}set streamType(e){this.setAttribute(P.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,r;return(r=(t=this.getAttribute($.DEFAULT_STREAM_TYPE))!=null?t:(e=this.mediaController)==null?void 0:e.getAttribute($.DEFAULT_STREAM_TYPE))!=null?r:_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(Dr(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,fr).call(this),!this.media){si("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,fr).call(this),!this.media){si("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,fr).call(this),!this.media){si("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,fr).call(this),!this.media){si("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),r=this.getAttribute($.STORYBOARD_TOKEN);return{...Te(this,wd),...e!=null?{playback:e}:{},...t!=null?{thumbnail:t}:{},...r!=null?{storyboard:r}:{}}}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,r,s){var n;let a=(n=this.media)==null?void 0:n.nativeEl;if(a)return Lm(a,e,t,r,s)}removeTextTrack(e){var t;let r=(t=this.media)==null?void 0:t.nativeEl;if(r)return cI(r,e)}get textTracks(){var e;return(e=this.media)==null?void 0:e.textTracks}};Rd=new WeakMap,wd=new WeakMap,Jr=new WeakMap,Cd=new WeakMap,In=new WeakMap,Yi=new WeakSet,fr=function(){var i,e,t;if(!Te(this,Rd)){Zi(this,Rd,!0),ze(this,ts,hn).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof lt.HTMLElement))throw""}catch{si("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof YD))throw""}catch{si("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof PR))throw""}catch{si("<media-controller> failed to upgrade!")}LM(this),ze(this,Jf,Jg).call(this),ze(this,em,ev).call(this),ze(this,tm,tv).call(this),Zi(this,Jr,(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,ts,hn).call(this)})}},Qf=new WeakSet,t_=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,ts,hn).call(this)},ts=new WeakSet,hn=function(i={}){GM(HM(zM(this,{...Te(this,In),...i})),this.shadowRoot)},Jf=new WeakSet,Jg=function(){let i=e=>{var t,r;if(!(e!=null&&e.startsWith("theme-")))return;let s=e.replace(/^theme-/,"");if(Xf.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)},em=new WeakSet,ev=function(){var i;let e=t=>{let{detail:r}=t;if(r instanceof Ct||(r=new Ct(r.message,r.code,r.fatal)),!(r!=null&&r.fatal)){cs(r),r.data&&cs(`${r.name} data:`,r.data);return}let{dialog:s,devlog:n}=jf(r,!window.navigator.onLine,this.playbackId,this.playbackToken);n.message&&qT(n),si(r),r.data&&si(`${r.name} data:`,r.data),ze(this,Ac,Zf).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 Ct))return t;let{devlog:a}=jf((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 Ct(a,o)}n!=null&&n.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:n}))})},tm=new WeakSet,tv=function(){var i,e,t,r;let s=()=>ze(this,ts,hn).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)},im=new WeakSet,iv=function(){var i,e;if(!/Firefox/i.test(navigator.userAgent))return;let t,r=new WeakMap,s=()=>this.streamType===_e.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,c=!1)=>{s()||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;r.has(u)||r.set(u,u.line),u.line=m}else setTimeout(()=>{u.line=r.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,Jr))};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,Jr)!==c&&(Zi(this,Jr,c),n(t,Te(this,Jr)))})};function Dr(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}lt.customElements.get("mux-player")||(lt.customElements.define("mux-player",rv),lt.MuxPlayerElement=rv);var sv={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},s2=i=>i==null,n2=(i,e)=>s2(e)?!1:i in e,a2=i=>i.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),o2=(i,e)=>{if(!(typeof e=="boolean"&&!e)){if(n2(i,sv))return sv[i];if(typeof e!=null)return/[A-Z]/.test(i)?a2(i):i}},l2=(i,e)=>typeof i=="boolean"?"":i,d2=(i={})=>Object.entries(i).reduce((e,[t,r])=>{let s=o2(t,r);if(!s)return e;let n=l2(r);return e[s]=n,e},{}),c2=(...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},u2=Object.prototype.hasOwnProperty,h2=(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(!u2.call(e,t[s])||!Object.is(i[t[s]],e[t[s]]))return!1;return!0},i_=(i,e,t)=>!h2(e,i[t]),f2=(i,e,t)=>{i[t]=e},m2=(i,e,t,r=f2,s=i_)=>pt.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]),Wi=m2,p2=()=>{try{return"2.7.0"}catch{}return"UNKNOWN"},g2=p2(),v2=()=>g2,E2=Dd.forwardRef(({children:i,...e},t)=>Dd.createElement("mux-player",d2({...e,ref:t}),i)),ke=(i,e,t)=>pt.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]),b2=(i,e)=>{let{onAbort:t,onCanPlay:r,onCanPlayThrough:s,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,...se}=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:i_(J,de,Ae)),Wi("currentTime",oe,i,(J,de)=>{de!=null&&(J.currentTime=de)}),ke("abort",i,t),ke("canplay",i,r),ke("canplaythrough",i,s),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),[se]},y2=v2(),T2="mux-player-react",_2=Dd.forwardRef((i,e)=>{let t=pt.useRef(null),r=c2(t,e),[s]=b2(t,i);return Dd.createElement(E2,{ref:r,playerSoftwareName:T2,playerSoftwareVersion:y2,...s})}),A2=_2;const S2=Gc.object({time:Gc.number(),expiresAt:Gc.string()}).transform(i=>({time:Number(i.time),expiresAt:new Date(i.expiresAt)}));function x2(){var e;const i=E_("root");return((e=i==null?void 0:i.preferences)==null?void 0:e.player)??null}const k2=["INPUT","SELECT","BUTTON","TEXTAREA","MUX-PLAYER","SUMMARY"],L2=["button","option","combobox","tab","tablist"];function nv(i){let e=i;for(;e;){if(!(e instanceof HTMLElement))return!1;if(k2.includes(e.tagName)||L2.includes(e.getAttribute("role")||"")||e.isContentEditable)return!0;e=e.parentElement}return!1}function av(i){const e=pt.useRef(i);return pt.useEffect(()=>{e.current=i},[i]),e}function I2({muxPlayerRef:i,...e}){const t=x2(),r=v_(),[s,n]=pt.useState(!1),a=`${e.playbackId}:currentTime`,[o,l]=pt.useState(0),d=av(r),c=av(t);pt.useEffect(()=>{if(typeof document>"u")return;const h=sessionStorage.getItem(a);if(h)try{const{time:f,expiresAt:m}=S2.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;nv(m)||nv(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 u=m_(()=>{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"}};rm(m,c.current)||d.current.submit(m,{method:"POST",action:"/video-player",encType:"application/json"})},300);return pt.useEffect(()=>{var m,p;if(!s)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)}},[s,i,c,u]),W.jsx("div",{className:"flex aspect-video flex-col",children:W.jsx(A2,{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 rm(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(!rm(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(!rm(i[s],e[s]))return!1;return!0}const r_=pt.createContext(null);function lO({children:i,epicVideoInfosPromise:e}){return W.jsx(r_.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),r=t.includes("solution");let s=t.pop();const n=["problem","solution","embed","exercise"],a=u=>u&&!n.includes(u);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"],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 r?`${c} (🏁 solution)`:c}function R2({url:i,title:e="Video Embed",loadingContent:t=W.jsx(sm,{children:W.jsxs("span",{children:['Loading "',e,'"']})})}){const[r,s]=pt.useState(!1);return W.jsxs("div",{className:"relative aspect-video w-full flex-shrink-0 shadow-lg dark:shadow-gray-800",children:[r?null:W.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:t}),W.jsx("iframe",{onLoad:()=>s(!0),onError:()=>s(!0),src:i,className:p_("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 n_({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(g_,{className:"flex-shrink-0",name:"Video",size:"lg"}),e," ",W.jsx("span",{"aria-hidden":!0,children:"↗︎"})]})}function dO({url:i,title:e=s_(i)}){const{product:{host:t,displayName:r}}=T_(),s=y_(),n=pt.useContext(r_),a=W.jsx("div",{children:W.jsx(n_,{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(sm,{children:e})}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[a,W.jsx("div",{className:"h-[32px]"})]})]}),children:W.jsx(b_,{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:s?"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(w2,{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 ",r," 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 w2({url:i,title:e=s_(i),muxPlaybackId:t,transcript:r}){const s=pt.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 c=o.index,u=n.lastIndex,h=r.slice(l+1,c-1);a.push(W.jsx("span",{children:h},c)),a.push(W.jsx("button",{className:"underline",onClick:f=>{s.current&&(s.current.currentTime=C2(d),s.current.play(),s.current.scrollIntoView({behavior:"smooth",inline:"center",block:"start"}),f.currentTarget.blur())},children:d},d)),l=u}return a.push(W.jsx("span",{children:r.slice(l+1,r.length)},r.length)),W.jsxs("div",{children:[W.jsx("div",{className:"shadow-lg dark:shadow-gray-800",children:W.jsx(I2,{playbackId:t,muxPlayerRef:s,title:e})}),W.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[W.jsx(n_,{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 C2(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 na({url:i,title:e}){const t=f_();let r=new URL("https://epicweb.dev");try{r=new URL(i)}catch(s){return console.error(s),W.jsxs("div",{children:['Invalid URL: "',i,'"']})}return r.pathname=r.pathname.endsWith("/")?`${r.pathname}embed`:`${r.pathname}/embed`,r.searchParams.set("theme",t),W.jsx(R2,{url:r.toString(),title:e,loadingContent:W.jsx(sm,{children:W.jsxs("span",{children:['Loading "',W.jsx("a",{className:"underline",href:i,children:e}),'"']})})})}export{dO as D,lO as E,R2 as V};
|
|
2988
|
-
//# sourceMappingURL=epic-video-
|
|
2988
|
+
//# sourceMappingURL=epic-video-bs7WmhbC.js.map
|