PageSourceSearch

https://www.stern.de/public/body-KHCZF3BQ.js

js stern.de collected 2026-10-01 07:32:18 UTC 461,947 bytes, 1,321 lines download raw bytes

1"use strict";(()=>{var Ga=Object.create;var Lt=Object.defineProperty;var Ya=Object.getOwnPropertyDescriptor;var Jh=Object.getOwnPropertyNames;var ep=Object.getPrototypeOf,tp=Object.prototype.hasOwnProperty;var Ka=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Pt=e=>{throw TypeError(e)};var ip=(e,t,i)=>t in e?Lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var za=(e,t)=>Lt(e,"name",{value:t,configurable:!0});var np=(e,t,i)=>()=>{if(i)throw i[0];try{return e&&(t=e(e=0)),t}catch(n){throw i=[n],n}};var sp=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}},rp=(e,t)=>{for(var i in t)Lt(e,i,{get:t[i],enumerable:!0})},ap=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Jh(t))!tp.call(e,s)&&s!==i&&Lt(e,s,{get:()=>t[s],enumerable:!(n=Ya(t,s))||n.enumerable});return e};var op=(e,t,i)=>(i=e!=null?Ga(ep(e)):{},ap(t||!e||!e.__esModule?Lt(i,"default",{value:e,enumerable:!0}):i,e));var Xa=e=>[,,,Ga(e?.[Ka("metadata")]??null)],Qa=["class","method","getter","setter","accessor","field","value","get","set"],ni=e=>e!==void 0&&typeof e!="function"?Pt("Function expected"):e,lp=(e,t,i,n,s)=>({kind:Qa[e],name:t,metadata:n,addInitializer:r=>i._?Pt("Already initialized"):s.push(ni(r||null))}),cp=(e,t)=>ip(t,Ka("metadata"),e[3]),ge=(e,t,i,n)=>{for(var s=0,r=e[t>>1],a=r&&r.length;s<a;s++)t&1?r[s].call(i):n=r[s].call(i,n);return n},Ge=(e,t,i,n,s,r)=>{var a,l,u,o,c,d=t&7,h=!!(t&8),f=!!(t&16),g=d>3?e.length+1:d?h?1:2:0,p=Qa[d+5],y=d>3&&(e[g-1]=[]),m=e[g]||(e[g]=[]),b=d&&(!f&&!h&&(s=s.prototype),d<5&&(d>3||!f)&&Ya(d<4?s:{get[i](){return lt(this,r)},set[i](T){return ja(this,r,T)}},i));d?f&&d<4&&za(r,(d>2?"set ":d>1?"get ":"")+i):za(s,i);for(var v=n.length-1;v>=0;v--)o=lp(d,i,u={},e[3],m),d&&(o.static=h,o.private=f,c=o.access={has:f?T=>up(s,T):T=>i in T},d^3&&(c.get=f?T=>(d^1?lt:si)(T,s,d^4?r:b.get):T=>T[i]),d>2&&(c.set=f?(T,L)=>ja(T,s,L,d^4?r:b.set):(T,L)=>T[i]=L)),l=(0,n[v])(d?d<4?f?r:b[p]:d>4?void 0:{get:b.get,set:b.set}:s,o),u._=1,d^4||l===void 0?ni(l)&&(d>4?y.unshift(l):d?f?r=l:b[p]=l:s=l):typeof l!="object"||l===null?Pt("Object expected"):(ni(a=l.get)&&(b.get=a),ni(a=l.set)&&(b.set=a),ni(a=l.init)&&y.unshift(a));return d||cp(e,s),b&&Lt(s,i,b),f?d^4?r:b:s};var ts=(e,t,i)=>t.has(e)||Pt("Cannot "+i),up=(e,t)=>Object(t)!==t?Pt('Cannot use the "in" operator on this value'):e.has(t),lt=(e,t,i)=>(ts(e,t,"read from private field"),i?i.call(e):t.get(e)),De=(e,t,i)=>t.has(e)?Pt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ja=(e,t,i,n)=>(ts(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),si=(e,t,i)=>(ts(e,t,"access private method"),i);var Jo=sp((qT,Zo)=>{"use strict";var hi;typeof window<"u"?hi=window:typeof global<"u"?hi=global:typeof self<"u"?hi=self:hi={};Zo.exports=hi});var $h={};rp($h,{default:()=>ES,patchAndPolyfillConstructedStylesheets:()=>vS});function ru(e){let{x:t,y:i,width:n,height:s}=e;return{width:n,height:s,top:i,left:t,right:t+n,bottom:i+s,x:t,y:i}}function Kl(e,t,i,n,s,r,a){try{var l=e[r](a),u=l.value}catch(o){i(o);return}l.done?t(u):Promise.resolve(u).then(n,s)}function te(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var r=e.apply(t,i);function a(u){Kl(r,n,s,a,l,"next",u)}function l(u){Kl(r,n,s,a,l,"throw",u)}a(void 0)})}}function Ci(e){"@babel/helpers - typeof";return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(e)}function nm(e,t){if(Ci(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t||"default");if(Ci(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sm(e){var t=nm(e,"string");return Ci(t)=="symbol"?t:t+""}function rm(e,t,i){return(t=sm(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Xl(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),i.push.apply(i,n)}return i}function $(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];
vendor: 4,726 bytes, line 1
1t%2?Xl(Object(i),!0).forEach(function(n){rm(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xl(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function zn(){return typeof window<"u"}function Zt(e){return au(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(au(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function au(e){return zn()?e instanceof Node||e instanceof ye(e).Node:!1}function Ue(e){return zn()?e instanceof Element||e instanceof ye(e).Element:!1}function rt(e){return zn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Ql(e){return!zn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function jn(e){let{overflow:t,overflowX:i,overflowY:n,display:s}=Be(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&s!=="inline"&&s!=="contents"}function am(e){return/^(table|td|th)$/.test(Zt(e))}function Gn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}function Ta(e){let t=Ue(e)?Be(e):e;return bt(t.transform)||bt(t.translate)||bt(t.scale)||bt(t.rotate)||bt(t.perspective)||!ka()&&(bt(t.backdropFilter)||bt(t.filter))||om.test(t.willChange||"")||lm.test(t.contain||"")}function cm(e){let t=St(e);for(;rt(t)&&!Ii(t);){if(Ta(t))return t;if(Gn(t))return null;t=St(t)}return null}function ka(){return Cr==null&&(Cr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cr}function Ii(e){return/^(html|body|#document)$/.test(Zt(e))}function Be(e){return ye(e).getComputedStyle(e)}function Yn(e){return Ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function St(e){if(Zt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ql(e)&&e.host||$e(e);return Ql(t)?t.host:t}function ou(e){let t=St(e);return Ii(t)?(e.ownerDocument||e).body:rt(t)&&jn(t)?t:ou(t)}function Li(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);let s=ou(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),a=ye(s);if(r){let l=Gr(a);return t.concat(a,a.visualViewport||[],jn(s)?s:[],l&&i?Li(l):[])}return t.concat(s,Li(s,[],i))}function Gr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lu(e){let t=Be(e),i=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=rt(e),r=s?e.offsetWidth:i,a=s?e.offsetHeight:n,l=Hn(i)!==r||Hn(n)!==a;return l&&(i=r,n=a),{width:i,height:n,$:l}}function Aa(e){return Ue(e)?e:e.contextElement}function Gt(e){let t=Aa(e);if(!rt(t))return We(1);let i=t.getBoundingClientRect(),{width:n,height:s,$:r}=lu(t),a=(r?Hn(i.width):i.width)/n,l=(r?Hn(i.height):i.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}function cu(e){let t=ye(e);return!ka()||!t.visualViewport?um:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dm(e,t,i){return t===void 0&&(t=!1),!!i&&t&&i===ye(e)}function Tt(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);let s=e.getBoundingClientRect(),r=Aa(e),a=We(1);t&&(n?Ue(n)&&(a=Gt(n)):a=Gt(e));let l=dm(r,i,n)?cu(r):We(0),u=(s.left+l.x)/a.x,o=(s.top+l.y)/a.y,c=s.width/a.x,d=s.height/a.y;if(r&&n){let h=ye(r),f=Ue(n)?ye(n):n,g=h,p=Gr(g);for(;p&&f!==g;){let y=Gt(p),m=p.getBoundingClientRect(),b=Be(p),v=m.left+(p.clientLeft+parseFloat(b.paddingLeft))*y.x,T=m.top+(p.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,o*=y.y,c*=y.x,d*=y.y,u+=v,o+=T,g=ye(p),p=Gr(g)}}return ru({width:c,height:d,x:u,y:o})}function Kn(e,t){let i=Yn(e).scrollLeft;return t?t.left+i:Tt($e(e)).left+i}function uu(e,t){let i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Kn(e,i),y:i.top+t.scrollTop}}function hm(e){let{elements:t,rect:i,offsetParent:n,strategy:s}=e,r=s==="fixed",a=$e(n),l=t?Gn(t.floating):!1;if(n===a||l&&r)return i;let u={scrollLeft:0,scrollTop:0},o=We(1),c=We(0),d=rt(n);if((d||!r)&&((Zt(n)!=="body"||jn(a))&&(u=Yn(n)),d)){let f=Tt(n);o=Gt(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}let h=a&&!d&&!r?uu(a,u):We(0);return{width:i.width*o.x,height:i.height*o.y,x:i.x*o.x-u.scrollLeft*o.x+c.x+h.x,y:i.y*o.y-u.scrollTop*o.y+c.y+h.y}}function pm(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function fm(e){let t=Yn(e),i=e.ownerDocument.body,n=jt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=jt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),r=-t.scrollLeft+Kn(e),a=-t.scrollTop;return Be(i).direction==="rtl"&&(r+=jt(e.clientWidth,i.clientWidth)-n),{width:n,height:s,x:r,y:a}}function mm(e,t,i){i===void 0&&(i="viewport");
1let n=i==="layoutViewport",s=ye(e),r=$e(e),a=s.visualViewport,l=r.clientWidth,u=r.clientHeight,o=0,c=0;if(a){let d=!ka()||t==="fixed";n?d||(o=-a.offsetLeft,c=-a.offsetTop):(l=a.width,u=a.height,d&&(o=a.offsetLeft,c=a.offsetTop))}if(Kn(r)<=0){let d=r.ownerDocument,h=d.body,f=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-h.clientWidth-g),y=getComputedStyle(r).scrollbarGutter==="stable both-edges"?p/2:p;y<=gm&&(l-=y)}return{width:l,height:u,x:o,y:c}}function bm(e,t){let i=Tt(e,!0,t==="fixed"),n=i.top+e.clientTop,s=i.left+e.clientLeft,r=Gt(e);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:s*r.x,y:n*r.y}}function Zl(e,t,i){let n;if(t==="viewport"||t==="layoutViewport")n=mm(e,i,t);else if(t==="document")n=fm($e(e));else if(Ue(t))n=bm(t,i);else{let s=cu(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ru(n)}function ym(e,t){let i=t.get(e);if(i)return i;let n=Li(e,[],!1).filter(l=>Ue(l)&&Zt(l)!=="body"),s=null,r=Be(e).position==="fixed",a=r?St(e):e;for(;Ue(a)&&!Ii(a);){let l=Be(a),u=Ta(a),o=s?s.position:r?"fixed":"";!u&&(o==="fixed"||o==="absolute"&&l.position==="static")?n=n.filter(c=>c!==a):s=l,a=St(a)}return t.set(e,n),n}function vm(e){let{element:t,boundary:i,rootBoundary:n,strategy:s}=e,r=[...i==="clippingAncestors"?Gn(t)?[]:ym(t,this._c):[].concat(i),n],a=Zl(t,r[0],s),l=a.top,u=a.right,o=a.bottom,c=a.left;for(let d=1;d<r.length;d++){let h=Zl(t,r[d],s);l=jt(h.top,l),u=jr(h.right,u),o=jr(h.bottom,o),c=jt(h.left,c)}return{width:u-c,height:o-l,x:c,y:l}}function Em(e){let{width:t,height:i}=lu(e);return{width:t,height:i}}function wm(e,t,i){let n=rt(t),s=$e(t),r=i==="fixed",a=Tt(e,!0,r,t),l={scrollLeft:0,scrollTop:0},u=We(0);if((n||!r)&&((Zt(t)!=="body"||jn(s))&&(l=Yn(t)),n)){let c=Tt(t,!0,r,t);u.x=c.x+t.clientLeft,u.y=c.y+t.clientTop}!n&&s&&(u.x=Kn(s));let o=s&&!n&&!r?uu(s,l):We(0);return{x:a.left+l.scrollLeft-u.x-o.x,y:a.top+l.scrollTop-u.y-o.y,width:a.width,height:a.height}}function Ir(e){return Be(e).position==="static"}function Jl(e,t){if(!rt(e)||Be(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return $e(e)===i&&(i=i.ownerDocument.body),i}function du(e,t){let i=ye(e);if(Gn(e))return i;if(!rt(e)){let s=St(e);for(;s&&!Ii(s);){if(Ue(s)&&!Ir(s))return s;s=St(s)}return i}let n=Jl(e,t);for(;n&&am(n)&&Ir(n);)n=Jl(n,t);return n&&Ii(n)&&Ir(n)&&!Ta(n)?i:n||cm(e)||i}function Tm(e){return Be(e).direction==="rtl"}function hu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function km(e,t,i){let n=null,s,r=$e(e);function a(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();let h=e.getBoundingClientRect(),{left:f,top:g,width:p,height:y}=h;if(c||t(),!p||!y)return;let m=An(g),b=An(r.clientWidth-(f+p)),v=An(r.clientHeight-(g+y)),T=An(f),L={rootMargin:-m+"px "+-b+"px "+-v+"px "+-T+"px",threshold:jt(0,jr(1,d))||1},M=!0;function D(j){let R=j[0].intersectionRatio;if(!hu(h,e.getBoundingClientRect()))return l();if(R!==d){if(!M)return l();R?l(!1,R):s=setTimeout(()=>{l(!1,1e-7)},1e3)}M=!1}try{n=new IntersectionObserver(D,$($({},L),{},{root:r.ownerDocument}))}catch{n=new IntersectionObserver(D,L)}n.observe(e)}let u=ye(e),o=()=>l(i);return u.addEventListener("resize",o),l(!0),()=>{u.removeEventListener("resize",o),a()}}function Yr(e,t,i,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,o=Aa(e),c=s||r?[...o?Li(o):[],...t?Li(t):[]]:[];c.forEach(m=>{s&&m.addEventListener("scroll",i),r&&m.addEventListener("resize",i)});let d=o&&l?km(o,i,r):null,h=-1,f=null;a&&(f=new ResizeObserver(m=>{let[b]=m;b&&b.target===o&&f&&t&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(t)})),i()}),o&&!u&&f.observe(o),t&&f.observe(t));let g,p=u?Tt(e):null;u&&y();function y(){let m=Tt(e);p&&!hu(p,m)&&i(),p=m,g=requestAnimationFrame(y)}return i(),()=>{var m;c.forEach(b=>{s&&b.removeEventListener("scroll",i),r&&b.removeEventListener("resize",i)}),d?.(),(m=f)==null||m.disconnect(),f=null,u&&cancelAnimationFrame(g)}}function Vn(e){let t={};for(let i of Object.keys(e)){let n=e[i];n&&(Array.isArray(n)||n instanceof Pi?n=n.map(Vn):n.constructor===Object&&(n=Vn(n))),t[i]=n}return t}function Se(e){return e>=48&&e<=57}function Kt(e){return Se(e)||e>=65&&e<=70||e>=97&&e<=102}function Ca(e){return e>=65&&e<=90}function Cm(e){return e>=97&&e<=122}function Im(e){return Ca(e)||Cm(e)}function Lm(e){return e>=128}function Un(e){return Im(e)||Lm(e)||e===95}function pu(e){return Un(e)||Se(e)||e===45}function Pm(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function Bn(e){return e===10||e===13||e===12}function kt(e){return Bn(e)||e===32||e===9}function Ve(e,t){return!(e!==92||Bn(t)||t===Am)}function Lr(e,t,i){return e===45?Un(t)||t===45||Ve(t,i):Un(e)?!0:e===92&&Ve(e,t)}function Pr(e,t,i){return e===43||e===45?Se(t)?2:t===46&&Se(i)?3:0:e===46?Se(t)?2:0:+!!Se(e)}function fu(e){return+(e===65279||e===65534)}function Rr(e){return e<128?Kr[e]:132}function Yt(e,t){return t<e.length?e.charCodeAt(t):0}function Xr(e,t,i){return i===13&&Yt(e,t+1)===10?2:1}function gu(e,t,i){let n=e.charCodeAt(t);return Ca(n)&&(n|=32),n===i}function Fn(e,t,i,n){if(i-t!==n.length||t<0||i>e.length)return!1;for(let s=t;s<i;s++){let r=n.charCodeAt(s-t),a=e.charCodeAt(s);if(Ca(a)&&(a|=32),a!==r)return!1}return!0}function Rm(e,t){for(;t>=0&&kt(e.charCodeAt(t));t--);return t+1}function Cn(e,t){for(;t<e.length&&kt(e.charCodeAt(t));t++);return t}function xr(e,t){for(;t<e.length&&Se(e.charCodeAt(t));t++);return t}function Xt(e,t){if(t+=2,Kt(Yt(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&Kt(Yt(e,t));t++);let i=Yt(e,t);kt(i)&&(t+=Xr(e,t,i))}return t}function In(e,t){for(;t<e.length;t++){let i=e.charCodeAt(t);if(!pu(i)){if(Ve(i,Yt(e,t+1))){t=Xt(e,t)-1;continue}break}}return t}function mu(e,t){let i=e.charCodeAt(t);if((i===43||i===45)&&(i=e.charCodeAt(t+=1)),Se(i)&&(t=xr(e,t+1),i=e.charCodeAt(t)),i===46&&Se(e.charCodeAt(t+1))&&(t+=2,t=xr(e,t)),gu(e,t,101)){let n=0;i=e.charCodeAt(t+1),(i===45||i===43)&&(n=1,i=e.charCodeAt(t+2)),Se(i)&&(t=xr(e,t+1+n+1))}return t}function _r(e,t){for(;t<e.length;t++){let i=e.charCodeAt(t);if(i===41){t++;break}Ve(i,Yt(e,t+1))&&(t=Xt(e,t))}return t}function bu(e){if(e.length===1&&!Kt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>
11114111)&&(t=65533),String.fromCodePoint(t)}function qn(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,xm)):e}function ic(e){let t=e.source,i=t.length,n=t.length>0?fu(t.charCodeAt(0)):0,s=qn(e.lines,i),r=qn(e.columns,i),a=e.startLine,l=e.startColumn;for(let u=n;u<i;u++){let o=t.charCodeAt(u);s[u]=a,r[u]=l++,(o===ec||o===tc||o===_m)&&(o===tc&&u+1<i&&t.charCodeAt(u+1)===ec&&(u++,s[u]=a,r[u]=l),a++,l=1)}s[i]=a,r[i]=l,e.lines=s,e.columns=r,e.computed=!0}function nc(e,t,i){return e<t?t:e>i?i:e}function yu(e,t){function i(d){return d<l?e.charCodeAt(d):0}function n(){if(o=mu(e,o),Lr(i(o),i(o+1),i(o+2))){c=12,o=In(e,o);return}if(i(o)===37){c=11,o++;return}c=10}function s(){let d=o;if(o=In(e,o),Fn(e,d,o,"url")&&i(o)===40){if(o=Cn(e,o+1),i(o)===34||i(o)===39){c=2,o=d+4;return}a();return}if(i(o)===40){c=2,o++;return}c=1}function r(d){for(d||(d=i(o++)),c=5;o<e.length;o++){let h=e.charCodeAt(o);switch(Rr(h)){case d:o++;return;case 130:if(Bn(h)){o+=Xr(e,o,h),c=6;return}break;case 92:if(o===e.length-1)break;let f=i(o+1);Bn(f)?o+=Xr(e,o+1,f):Ve(h,f)&&(o=Xt(e,o)-1)}}}function a(){for(c=7,o=Cn(e,o);o<e.length;o++){let d=e.charCodeAt(o);switch(Rr(d)){case 41:o++;return;case 130:if(o=Cn(e,o),i(o)===41||o>=e.length){o<e.length&&o++;return}o=_r(e,o),c=8;return;case 34:case 39:case 40:case 133:o=_r(e,o),c=8;return;case 92:if(Ve(d,i(o+1))){o=Xt(e,o)-1;break}o=_r(e,o),c=8;return}}}e=String(e||"");let l=e.length,u=fu(i(0)),o=u,c;for(;o<l;){let d=e.charCodeAt(o);switch(Rr(d)){case 130:c=13,o=Cn(e,o+1);break;case 34:r();break;case 35:pu(i(o+1))||Ve(i(o+1),i(o+2))?(c=4,o=In(e,o+1)):(c=9,o++);break;case 39:r();break;case 40:c=21,o++;break;case 41:c=22,o++;break;case 43:Pr(d,i(o+1),i(o+2))?n():(c=9,o++);break;case 44:c=18,o++;break;case 45:Pr(d,i(o+1),i(o+2))?n():i(o+1)===45&&i(o+2)===62?(c=15,o+=3):Lr(d,i(o+1),i(o+2))?s():(c=9,o++);break;case 46:Pr(d,i(o+1),i(o+2))?n():(c=9,o++);break;case 47:i(o+1)===42?(c=25,o=e.indexOf("*/",o+2),o=o===-1?e.length:o+2):(c=9,o++);break;case 58:c=16,o++;break;case 59:c=17,o++;break;case 60:i(o+1)===33&&i(o+2)===45&&i(o+3)===45?(c=14,o+=4):(c=9,o++);break;case 64:Lr(i(o+1),i(o+2),i(o+3))?(c=3,o=In(e,o+1)):(c=9,o++);break;case 91:c=19,o++;break;case 92:Ve(d,i(o+1))?s():(c=9,o++);break;case 93:c=20,o++;break;case 123:c=23,o++;break;case 125:c=24,o++;break;case 131:n();break;case 132:s();break;default:c=9,o++}t(c,u,u=o)}}function Om(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===sc&&e.charCodeAt(t+1)===sc}function wu(e){let t=e.length,i=e.charCodeAt(0),n=+(i===vu||i===Eu),s=n===1&&t>1&&e.charCodeAt(t-1)===i?t-2:t-1,r="";for(let a=n;a<=s;a++){let l=e.charCodeAt(a);if(l===Zr){if(a===s){a!==t-1&&(r=e.substr(a+1));break}if(l=e.charCodeAt(++a),Ve(Zr,l)){let u=a-1,o=Xt(e,u);a=o-1,r+=bu(e.substring(u+1,o))}else l===13&&e.charCodeAt(a+1)===10&&a++}else r+=e[a]}return r}function Dm(e,t){let i=t?"'":'"',n=t?Eu:vu,s="",r=!1;for(let a=0;a<e.length;a++){let l=e.charCodeAt(a);if(l===0){s+="\uFFFD";continue}if(l<=31||l===127){s+="\\"+l.toString(16),r=!0;continue}l===n||l===Zr?(s+="\\"+e.charAt(a),r=!1):(r&&(Kt(l)||kt(l))&&(s+=" "),s+=e.charAt(a),r=!1)}return i+s+i}function Fm(e){let t=e.length,i=4,n=e.charCodeAt(t-1)===Su?t-2:t-1,s="";for(;i<n&&kt(e.charCodeAt(i));)i++;for(;i<n&&kt(e.charCodeAt(n));)n--;for(let r=i;r<=n;r++){let a=e.charCodeAt(r);if(a===Jr){if(r===n){r!==t-1&&(s=e.substr(r+1));break}if(a=e.charCodeAt(++r),Ve(Jr,a)){let l=r-1,u=Xt(e,l);r=u-1,s+=bu(e.substring(l+1,u))}else a===13&&e.charCodeAt(r+1)===10&&r++}else s+=e[r]}return s}function qm(e){let t="",i=!1;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);if(s===0){t+="\uFFFD";continue}if(s<=31||s===127){t+="\\"+s.toString(16),i=!0;continue}s===Hm||s===Jr||s===Vm||s===Um||s===Bm||s===Su?(t+="\\"+e.charAt(n),i=!1):(i&&Kt(s)&&(t+=" "),t+=e.charAt(n),i=!1)}return"url("+t+")"}function rc(e){return typeof e=="function"?e:vi}function ac(e,t){return function(i,n,s){i.type===t&&e.call(this,i,n,s)}}function Wm(e,t){let i=t.structure,n=[];for(let s in i){if(Ia.call(i,s)===!1)continue;let r=i[s],a={name:s,type:!1,nullable:!1};Array.isArray(r)||(r=[r]);for(let l of r)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function $m(e){let t={};for(let i in e.node)if(Ia.call(e.node,i)){let n=e.node[i];if(!n.structure)throw Error("Missed `structure` field in `"+i+"` node type definition");t[i]=Wm(i,n)}return t}function oc(e,t){let i=e.fields.slice(),n=e.context,s=typeof n=="string";return t&&i.reverse(),function(r,a,l,u){let o;s&&(o=a[n],a[n]=r);for(let c of i){let d=r[c.name];if(!c.nullable||d){if(c.type==="list"){if(t?d.reduceRight(u,!1):d.reduce(u,!1))return!0}else if(l(d))return!0}}s&&(a[n]=o)}}function lc({StyleSheet:e,Atrule:t,Rule:i,Block:n,DeclarationList:s}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:i,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:i,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:i,Block:n,DeclarationList:s}}}function zm(e){let t=$m(e),i={},n={},s=Symbol("break-walk"),r=Symbol("skip-node");for(let o in t)Ia.call(t,o)&&t[o]!==null&&(i[o]=oc(t[o],!1),n[o]=oc(t[o],!0));let a=lc(i),l=lc(n),u=function(o,c){function d(m,b,v){let T=h.call(y,m,b,v);return T===s||T!==r&&!!(g.hasOwnProperty(m.type)&&g[m.type](m,y,d,p)||f.call(y,m,b,v)===s)}let h=vi,f=vi,g=i,p=(m,b,v,T)=>m||d(b,v,T),y={break:s,skip:r,root:o,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c=="function")h=c;else if(c&&(h=rc(c.enter),f=rc(c.leave),c.reverse&&(g=n),c.visit)){if(a.hasOwnProperty(c.visit))g=c.reverse?l[c.visit]:a[c.visit];else if(!t.hasOwnProperty(c.visit))throw Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=ac(h,c.visit),f=ac(f,c.visit)}if(h===vi&&f===vi)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");d(o)};return u.break=s,u.skip=r,u.find=function(o,c){let d=null;return u(o,function(h,f,g){if(c.call(this,h,f,g))return d=h,s}),d},u.findLast=function(o,c){let d=null;return u(o,{reverse:!0,enter(h,f,g){if(c.call(this,h,f,g))return d=h,s}}),d},u.findAll=function(o,c){let d=[];return u(o,function(h,f,g){c.call(this,h,f,g)&&d.push(h)}),d},u}function Mn(e,t){let i=this.tokenStart+e,n=this.charCodeAt(i);for((n===He||n===we)&&(t&&this.error("Number sign is not allowed"),i++);i<this.tokenEnd;i++)Se(this.charCodeAt(i))||this.error("Integer is expected",i)}function zt(e){return Mn.call(this,0,e)}function et(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let i="";switch(t){case _n:i="N is expected";break;case we:i="HyphenMinus is expected"}this.error(i,this.tokenStart+e)}}function Mr(){let e=0,t=0,i=this.tokenType;for(;i===13||i===25;)i=this.lookupType(++e);if(i!==10)if(this.isDelim(He,e)||this.isDelim(we,e)){t=this.isDelim(He,e)?He:we;do i=this.lookupType(++e);while(i===13||i===25);i!==10&&(this.skip(e),zt.call(this,vt))}else return null;return e>0&&this.skip(e),t===0&&(i=this.charCodeAt(this.tokenStart),i!==He&&i!==we&&this.error("Number sign is expected")),zt.call(this,t!==0),t===we?"-"+this.consume(10):this.consume(10)}function Tu(){let e=this.tokenStart,t=null,i=null;if(this.tokenType===10)zt.call(this,Gm),i=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,we))switch(t="-1",et.call(this,1,_n),this.tokenEnd-this.tokenStart){case 2:this.next(),i=Mr.call(this);break;case 3:et.call(this,2,we),this.next(),this.skipSC(),zt.call(this,vt),i="-"+this.consume(10);break;default:et.call(this,2,we),Mn.call(this,3,vt),this.next(),i=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(He)&&this.lookupType(1)===1){let n=0;switch(t="1",this.isDelim(He)&&(n=1,this.next()),et.call(this,0,_n),this.tokenEnd-this.tokenStart){case 1:this.next(),i=Mr.call(this);break;case 2:et.call(this,1,we),this.next(),this.skipSC(),zt.call(this,vt),i="-"+this.consume(10);break;default:et.call(this,1,we),Mn.call(this,2,vt),this.next(),i=this.substrToCursor(e+n+1)}}else if(this.tokenType===12){let n=this.charCodeAt(this.tokenStart),s=n===He||n===we,r=this.tokenStart+s;for(;r<this.tokenEnd&&Se(this.charCodeAt(r));r++);r===this.tokenStart+s&&this.error("Integer is expected",this.tokenStart+s),et.call(this,r-this.tokenStart,_n),t=this.substring(e,r),r+1===this.tokenEnd?(this.next(),i=Mr.call(this)):(et.call(this,r-this.tokenStart+1,we),r+2===this.tokenEnd?(this.next(),this.skipSC(),zt.call(this,vt),i="-"+this.consume(10)):(Mn.call(this,r-this.tokenStart+2,vt),this.next(),i=this.substrToCursor(r+1)))}else this.error();return t!==null&&t.charCodeAt(0)===He&&(t=t.substr(1)),i!==null&&i.charCo
1deAt(0)===He&&(i=i.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:i}}function ku(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let i=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+i)}else this.tokenize(t)}else this.tokenize(e.b)}function cc(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Qm(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}function Au(e=!1){let t=this.tokenStart,i,n,s=null,r=null;switch(this.eat(3),i=this.substrToCursor(t+1),n=i.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(s=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,i,e),cc):cc.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:r=hasOwnProperty.call(this.atrule,n)&&typeof this.atrule[n].block=="function"?this.atrule[n].block.call(this,e):this.Block(Qm.call(this))}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:i,prelude:s,block:r}}function Cu(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function Iu(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Lu(e){this.children(e)}function c0(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(Pu)?(t=!0,this.next()):this.isDelim(ea)||this.eat(1),this.isDelim(ea)?this.charCodeAt(this.tokenStart+1)===Nn?t&&this.error("Identifier is expected",this.tokenEnd):(this.next(),this.eat(1)):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function u0(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==Nn&&t!==l0&&t!==o0&&t!==a0&&t!==Pu&&t!==ea&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==Nn&&(this.isDelim(Nn)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function Ru(){let e=this.tokenStart,t,i=null,n=null,s=null;return this.eat(19),this.skipSC(),t=c0.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(i=u0.call(this),this.skipSC(),n=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(s=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:i,value:n,flags:s}}function xu(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}function _u(){return this.Raw(null,!0)}function uc(){return this.parseWithFallback(this.Rule,_u)}function dc(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function g0(){if(this.tokenType===17)return dc.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,dc);return this.tokenType===17&&this.next(),e}function Mu(e){let t=e?g0:uc,i=this.tokenStart,n=this.createList(
1);this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule.bind(this,e),_u));break;default:e&&this.isDelim(f0)?n.push(uc.call(this)):n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(i,this.tokenStart),children:n}}function Nu(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}function Ou(e,t){let i=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(i,this.tokenStart),children:n}}function Du(e){this.token(9,"["),this.children(e),this.token(9,"]")}function Hu(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function Vu(){this.token(15,"-->")}function Uu(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Bu(){this.token(14,"<!--")}function Fu(){return this.eatDelim(I0),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function qu(e){this.token(9,"."),this.token(1,e.name)}function Wu(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case _0:case x0:case M0:this.next();break;case hc:this.next(),this.eatIdent("deep"),this.eatDelim(hc);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function $u(e){this.tokenize(e.name)}function zu(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===H0&&this.charCodeAt(t-1)===V0&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function ju(e){this.token(25,"/*"+e.value+"*/")}function pc(e){return this.lookupTypeNonSC(1)===1&&q0.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}
1function Gu(e="media"){let t=this.createList();e:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let i=this.parseWithFallback(()=>z0[e].call(this,e),()=>null);i||(i=this.parseWithFallback(()=>{this.eat(21);let n=this.Condition(e);return this.eat(22),n},()=>this.GeneralEnclosed(e))),t.push(i);break}case 2:{let i=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);i||(i=this.GeneralEnclosed(e)),t.push(i);break}default:break e}return t.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(t),kind:e,children:t}}function Yu(e){e.children.forEach(t=>{t.type==="Condition"?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}function Z0(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function J0(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function eb(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Ku)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}function Xu(){let e=this.tokenStart,t=this.tokenIndex,i=sb.call(this),n=Om(i),s=n?this.parseCustomProperty:this.parseValue,r=n?J0:Z0,a=!1,l;this.skipSC(),this.eat(16);let u=this.tokenIndex;if(n||this.skipSC(),l=s?this.parseWithFallback(eb,r):r.call(this,this.tokenIndex),n&&l.type==="Value"&&l.children.isEmpty){for(let o=u-this.tokenIndex;o<=0;o++)if(this.lookupType(o)===13){l.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(Ku)&&(a=rb.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:a,property:i,value:l}}function Qu(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function sb(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case X0:case Y0:case Q0:case G0:case K0:this.next();break;case fc:this.next(),this.isDelim(fc)&&this.next()}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function rb(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"||e}function Nr(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}
1function Zu(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Nr));break;default:this.isDelim(ob)?e.push(this.parseWithFallback(this.Rule,Nr)):e.push(this.parseWithFallback(this.Declaration,Nr))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Ju(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}function ed(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function td(e){this.token(12,e.value+e.unit)}function id(e){let t=this.tokenStart,i,n=null;if(this.eat(21),this.skipSC(),i=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:n=this.lookupNonWSType(1)===9?this.Ratio():this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;case 2:n=this.parseWithFallback(()=>{let s=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(fb)&&this.error(),s},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(t,this.tokenStart),kind:e,name:i,value:n}}function nd(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function Eb(e,t){let i=(this.features[e]||{})[t];return typeof i!="function"&&this.error(`Unknown feature ${t}()`),i}function sd(e="unknown"){let t=this.tokenStart,i=this.consumeFunctionName(),n=Eb.call(this,e,i.toLowerCase());this.skipSC();let s=this.parseWithFallback(()=>{let r=this.tokenIndex,a=n.call(this);return this.eof===!1&&this.isBalanceEdge(r)===!1&&this.error(),a},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(t,this.tokenStart),kind:e,feature:i,value:s}}function rd(e){this.token(2,e.feature+"("),this.node(e.value),this.token(22,")")}function Or(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(gc,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(gc)&&this.error(),e},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function bc(e){if(this.skipSC(),this.isDelim(Sb)||this.isDelim(Tb)){let t=this.source[this.tokenStart];return this.next(),this.isDelim(mc)?(this.next(),t+"="):t}if(this.isDelim(mc))return"=";this.error(`Expected ${e?'":", ':""}"<", ">", "=" or ")"`)}function ad(e="unknown"){let t=this.tokenStart;this.skipSC(),this.eat(21);let i=Or.call(this),n=bc.call(this,i.type==="Identifier"),s=Or.call(this),r=null,a=null;return this.lookupNonWSType(0)!==22&&(r=bc.call(this),a=Or.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(t,this.tokenStart),kind:e,left:i,leftComparison:n,middle:s,rightComparison:r,right:a}}function od(e){this.token(21,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,")")}function ld(e,t){let i=this.tokenStart,n=this.consumeFunctionName(),s=n.toLowerCase(),r;return r=t.hasOwnProperty(s)?t[s].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(i,this.tokenStart),name:n,children:r}}function cd(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function ud(e){let t=this.tokenStart,i=null;this.tokenType===2?i=this.consumeFunctionName():this.eat(21);let n=this.parseWithFallback(()=>{let s=this.tokenIndex,r=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(s)===!1&&this.error(),r},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(t,this.tokenStart),kind:e,function:i,children:n}}function dd(e){e.function?this.token(2,e.function+"("):this.token(21,"("),this.children(e),this.token(22,")")}function hd(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function pd(e){this.token(4,"#"+e.value)}function fd(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function gd(e){this.token(1,e.name)}function md(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}
1function bd(e){this.token(9,"#"+e.name)}function yd(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(Wb);)this.eat(9),t+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(e,this.tokenStart),name:t}}function vd(e){this.tokenize(e.name)}function Ed(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(e),children:e}}function wd(e){this.children(e,()=>this.token(18,","))}function Sd(){let e=this.tokenStart,t=null,i=null,n=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let s=this.consume(1),r=s.toLowerCase();switch(r==="not"||r==="only"?(this.skipSC(),t=r,i=this.consume(1)):i=s,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent("and"),n=this.Condition("media");break;case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:n=this.Condition("media");break;case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:i,condition:n}}function Td(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}
1function kd(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Ad(e){this.children(e,()=>this.token(18,","))}function Cd(){let e=this.tokenStart;return this.eatDelim(iy),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function Id(){this.token(9,"&")}function Ld(){this.skipSC();let e=this.tokenStart,t=e,i=null,n;return n=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),i=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:n,selector:i}}function Pd(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}function Rd(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function xd(e){this.token(10,e.value)}function _d(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Md(e){this.tokenize(e.value)}function Nd(e,t){let i=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(i,this.tokenStart),children:n}}function Od(e){this.token(21,"("),this.children(e),this.token(22,")")}function Dd(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Hd(e){this.token(11,e.value+"%")}function Vd(){let e=this.tokenStart,t=null,i,n;return this.eat(16),this.tokenType===2?(i=this.consumeFunctionName(),n=i.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList(
1):hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):i=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:i,children:t}}function Ud(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function Bd(){let e=this.tokenStart,t=null,i,n;return this.eat(16),this.eat(16),this.tokenType===2?(i=this.consumeFunctionName(),n=i.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):i=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:i,children:t}}function Fd(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function vc(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}function qd(){let e=this.tokenStart,t=vc.call(this),i=null;return this.skipSC(),this.isDelim(yc)&&(this.eatDelim(yc),i=vc.call(this)),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:i}}function Wd(e){this.node(e.left),this.token(9,"/"),e.right?this.node(e.right):this.node(10,1)}function xy(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function $d(e,t){let i=this.getTokenStart(this.tokenIndex),n;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),n=t&&this.tokenStart>i?xy.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(i,n),value:this.substring(i,n)}}function zd(e){this.tokenize(e.value)}function Ec(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function Ny(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}function jd(){let e=this.tokenIndex,t=this.tokenStart,i,n;return i=this.parseRulePrelude?this.parseWithFallback(Ny,Ec):Ec.call(this,e),n=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:i,block:n}}function Gd(e){this.node(e.prelude),this.node(e.block)}function Yd(){let e=null,t=null;this.skipSC();let i=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(i,this.tokenStart),root:e,limit:t}}function Kd(e){e.root&&(this.token(21,"("),this.node(e.root),this.token(22,")")),e.limit&&(this.token(1,"to"),this.token(21,"("),this.node(e.limit),this.token(22,")"))}function Xd(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function Qd(e){this.children(e)}
1function Zd(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function Jd(e){this.children(e,()=>this.token(18,","))}function eh(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:wu(this.consume(5))}}function th(e){this.token(5,Dm(e.value))}function wc(){return this.Raw(null,!1)}function ih(){let e=this.tokenStart,t=this.createList(),i;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==Zy){this.next();continue}i=this.Comment();break;case 14:i=this.CDO();break;case 15:i=this.CDC();break;case 3:i=this.parseWithFallback(this.Atrule,wc);break;default:i=this.parseWithFallback(this.Rule,wc)}t.push(i)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function nh(e){this.children(e)}function sh(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(e,this.tokenStart),declaration:t}}function rh(e){this.token(21,"("),this.node(e.declaration),this.token(22,")")}function Dr(){this.tokenType!==1&&this.isDelim(av)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function ah(){let e=this.tokenStart;return this.isDelim(Sc)?(this.next(),Dr.call(this)):(Dr.call(this),this.isDelim(Sc)&&(this.next(),Dr.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function oh(e){this.tokenize(e.name)}function Ei(e,t){let i=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){let s=this.charCodeAt(n);if(s===ch&&t&&i!==0)return Ei.call(this,e+i+1,!1),-1;Kt(s)||this.error(t&&i!==0?"Hyphen minus"+(i<6?" or hex digit":"")+" is expected":i<6?"Hex digit is expected":"Unexpected input",n),++i>6&&this.error("Too many hex digits",n)}return this.next(),i}function Ln(e){let t=0;for(;this.isDelim(ta);)++t>e&&this.error("Too many question marks"),this.next()}function uv(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===lh?"Plus sign":"Hyphen minus")+" is expected")}function dv(){let e=0;switch(this.tokenType){case 10:if(e=Ei.call(this,1,!0),this.isDelim(ta)){Ln.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){uv.call(this,ch),Ei.call(this,1,!1);break}break;case 12:e=Ei.call(this,1,!0),e>0&&Ln.call(this,6-e);break;default:if(this.eatDelim(lh),this.tokenType===1){e=Ei.call(this,0,!0),e>0&&Ln.call(this,6-e);break}if(this.isDelim(ta)){this.next(),Ln.call(this,5);break}this.error("Hex digit or question mark is expected")}}function uh(){let e=this.tokenStart;return this.eatIdent("u"),dv.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function dh(e){this.tokenize(e.value)}function hh(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Fm(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=wu(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function ph(e){this.token(7,qm(e.value))}function fh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function gh(e){this.children(e)}function mh(){return this.eat(13),Ev}function bh(e){this.token(13,e.value)}function Ri(e){return La.includes(e)}function Tv(e){return Xn.includes(e)}function yh(e){return Qn.includes(e)}function kv(e){return Pa.includes(e)}function wh(e){return Av.includes(e)}function Sh(e){return Cv.includes(e)}function Lv(e){return Iv.includes(e)}function Pv(e){let t=new SourceMapGenerator,i={line:1,column:0},n={line:0,column:0},s={line:1,column:0},r={generated:s},a=1,l=0,u=!1,o=e.node;e.node=function(h){if(h.loc&&h.loc.start&&Tc.has(h.type)){let f=h.loc.start.line,g=h.loc.start.column-1;(n.line!==f||n.column!==g)&&(n.line=f,n.column=g,i.line=a,i.column=l,u&&(u=!1,(i.line!==s.line||i.column!==s.column)&&t.addMapping(r)),u=!0,t.addMapping({source:h.loc.source,original:n,generated:i}))}o.call(this,h),u&&Tc.has(h.type)&&(s.line=a,s.column=l)};let c=e.emit;e.emit=function(h,f,g){for(let p=0;p<h.length;
1p++)h.charCodeAt(p)===10?(a++,l=0):l++;c(h,f,g)};let d=e.result;return e.result=function(){return u&&t.addMapping(r),{css:d(),map:t}},e}function kh(e){let t=new Set(e.map(([i,n])=>Hr(i)<<16|Hr(n)));return function(i,n,s){let r=Hr(n,s),a=s.charCodeAt(0);return r|(a===xv&&n!==1&&n!==2&&n!==15||a===Rv?t.has((i&65534)<<16|a<<7):t.has((i&65534)<<16|r))}}function Ov(e,t){if(typeof t=="function"){let i=null;e.children.forEach(n=>{i!==null&&t.call(this,i),this.node(n),i=n});return}e.children.forEach(this.node,this)}function Dv(e){let t=new Map;for(let[i,n]of Object.entries(e.node))typeof(n.generate||n)=="function"&&t.set(i,n.generate||n);return function(i,n){let s="",r=0,a={node(u){if(t.has(u.type))t.get(u.type).call(l,u);else throw Error("Unknown node type: "+u.type)},tokenBefore:Ah,token(u,o,c){r=this.tokenBefore(r,u,o),!c&&r&1&&this.emit(" ",13,!0),this.emit(o,u,!1),u===9&&o.charCodeAt(0)===Nv&&this.emit(`
2`,13,!0)},emit(u){s+=u},result(){return s}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=Pv(a)),n.mode in kc&&(a.tokenBefore=kc[n.mode]));let l={node:u=>a.node(u),children:Ov,token:(u,o)=>a.token(u,o),tokenize:u=>yu(u,(o,c,d)=>{a.token(o,u.slice(c,d),c!==0)})};return a.node(i),a.result()}}function Vv(e,t){let i=Object.create(SyntaxError.prototype),n=Error();return Object.assign(i,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
3`)}})}function Cc({source:e,line:t,column:i,baseLine:n,baseColumn:s},r){function a(h,f){return l.slice(h,f).map((g,p)=>String(h+p+1).padStart(c)+" |"+g).join(`
4`)}let l=(`
5`.repeat(Math.max(n-1,0))+" ".repeat(Math.max(s-1,0))+e).split(/\r\n?|\n|\f/),u=Math.max(1,t-r)-1,o=Math.min(t+r,l.length+1),c=Math.max(4,String(o).length)+1,d=0;i+=3*(l[t-1].substr(0,i-1).match(/\t/g)||[]).length,i>Ac&&(d=i-Uv+3,i=58);for(let h=u;h<=o;h++)h>=0&&h<l.length&&(l[h]=l[h].replace(/\t/g,Bv),l[h]=(d>0&&l[h].length>d?"\u2026":"")+l[h].substr(d,98)+(l[h].length>d+Ac-1?"\u2026":""));return[a(u,t),Array(i+c+2).join("-")+"^",a(t,o)].filter(Boolean).join(`
6`).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Ic(e,t,i,n,s,r=1,a=1){return Object.assign(Vv("SyntaxError",e),{source:t,offset:i,line:n,column:s,sourceFragment(l){return Cc({source:t,line:n,column:s,baseLine:r,baseColumn:a},isNaN(l)?0:l)},get formattedMessage(){return`Parse error: ${e}
7`+Cc({source:t,line:n,column:s,baseLine:r,baseColumn:a},2)}})}
7function Fv(e){let t=this.createList(),i=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:i=!0,this.next();continue}let s=e.getNode.call(this,n);if(s===void 0)break;i&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,s,t,n),i=!1),t.push(s)}return i&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}function jv(e){return function(){return this[e]()}}function Ur(e){let t=Object.create(null);for(let i of Object.keys(e)){let n=e[i],s=n.parse||n;s&&(t[i]=s)}return t}function Gv(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Ur(e.atrule),pseudo:Ur(e.pseudo),node:Ur(e.node)};for(let[i,n]of Object.entries(e.parseContext))switch(typeof n){case"function":t.context[i]=n;break;case"string":t.context[i]=jv(n)}return $($({config:t},t),t.node)}function Yv(e){let t="",i="<unknown>",n=!1,s=$t,r=!1,a=new Mm,l=Object.assign(new Nm,Gv(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Fv,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(o){return+(o===Lc)},consumeUntilLeftCurlyBracketOrSemicolon(o){return+(o===Lc||o===Vr)},consumeUntilExclamationMarkOrSemicolon(o){return+(o===qv||o===Vr)},consumeUntilSemicolonIncluded(o){return o===Vr?2:0},createList:$t,createSingleNodeList:$t,getFirstListNode:$t,getLastListNode:$t,parseWithFallback(o,c){let d=this.tokenIndex;try{return o.call(this)}catch(h){if(r)throw h;this.skip(d-this.tokenIndex);let f=c.call(this);return r=!0,s(h,f),r=!1,f}},lookupNonWSType(o){let c;do if(c=this.lookupType(o++),c!==13&&c!==25)return c;while(c!==Pc);return Pc},charCodeAt(o){return o>=0&&o<t.length?t.charCodeAt(o):0},substring(o,c){return t.substring(o,c)},substrToCursor(o){return this.source.substring(o,this.tokenStart)},cmpChar(o,c){return gu(t,o,c)},cmpStr(o,c,d){return Fn(t,o,c,d)},consume(o){let c=this.tokenStart;return this.eat(o),this.substrToCursor(c)},consumeFunctionName(){let o=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),o},consumeNumber(o){let c=t.substring(this.tokenStart,mu(t,this.tokenStart));return this.eat(o),c}
7,eat(o){if(this.tokenType!==o){let c=Qr[o].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),d=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,h=this.tokenStart;switch(o){case 1:this.tokenType===2||this.tokenType===7?(h=this.tokenEnd-1,d="Identifier is expected but function found"):d="Identifier is expected";break;case 4:this.isDelim(Wv)&&(this.next(),h++,d="Name is expected");break;case 11:this.tokenType===10&&(h=this.tokenEnd,d="Percent sign is expected")}this.error(d,h)}this.next()},eatIdent(o){(this.tokenType!==1||this.lookupValue(0,o)===!1)&&this.error(`Identifier "${o}" is expected`),this.next()},eatDelim(o){this.isDelim(o)||this.error(`Delim "${String.fromCharCode(o)}" is expected`),this.next()},getLocation(o,c){return n?a.getLocationRange(o,c,i):null},getLocationFromList(o){if(n){let c=this.getFirstListNode(o),d=this.getLastListNode(o);return a.getLocationRange(c===null?this.tokenStart:c.loc.start.offset-a.startOffset,d===null?this.tokenStart:d.loc.end.offset-a.startOffset,i)}return null},error(o,c){let d=c!==void 0&&c<t.length?a.getLocation(c):this.eof?a.getLocation(Rm(t,t.length-1)):a.getLocation(this.tokenStart);throw new Ic(o||"Unexpected input",t,d.offset,d.line,d.column,a.startLine,a.startColumn)}}),u=()=>({filename:i,source:t,tokenCount:l.tokenCount,getTokenType:o=>l.getTokenType(o),getTokenTypeName:o=>Qr[l.getTokenType(o)],getTokenStart:o=>l.getTokenStart(o),getTokenEnd:o=>l.getTokenEnd(o),getTokenValue:o=>l.source.substring(l.getTokenStart(o),l.getTokenEnd(o)),substring:(o,c)=>l.source.substring(o,c),balance:l.balance.subarray(0,l.tokenCount+1),isBlockOpenerTokenType:l.isBlockOpenerTokenType,isBlockCloserTokenType:l.isBlockCloserTokenType,getBlockTokenPairIndex:o=>l.getBlockTokenPairIndex(o),getLocation:o=>a.getLocation(o,i),getRangeLocation:(o,c)=>a.getLocationRange(o,c,i)});return Object.assign(function(o,c){t=o,c=c||{},l.setSource(t,yu),a.setSource(t,c.offset,c.line,c.column),i=c.filename||"<unknown>",n=!!c.positions,s=typeof c.onParseError=="function"?c.onParseError:$t,r=!1,l.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,l.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,l.parseValue="parseValue"in c?!!c.parseValue:!0,l.parseCustomProperty="parseCustomProperty"in c&&!!c.parseCustomProperty;let{context:d="default",list:h=!0,onComment:f,onToken:g}=c;if(!(d in l.context))throw Error("Unknown context `"+d+"`");Object.assign(l,h?zv:$v),Array.isArray(g)?l.forEachToken((y,m,b)=>{g.push({type:y,start:m,end:b})}):typeof g=="function"&&l.forEachToken(g.bind(u())),typeof f=="function"&&l.forEachToken((y,m,b)=>{if(y===25){let v=l.getLocation(m,b),T=Fn(t,b-2,b,"*/")?t.slice(m+2,b-2):t.slice(m+2,b);f(T,v)}});let p=l.context[d].call(l,c);return l.eof||l.error(),p},{SyntaxError:Ic,config:l.config})}function Ch(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,Jv)&&this.cmpChar(this.tokenStart+1,Rc)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===Zv||t===Xv||t===Rc||t===Qv)return this.Operator();t===Kv&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}function cE(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function uE(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===xc&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case sE:case aE:case lE:case rE:return this.Combinator();case xc:return this.ClassSelector();case nE:case oE:return this.TypeSelector();case tE:return this.IdSelector();case iE:return this.NestingSelector()}}}function hE(){return this.createSingleNodeList(this.Raw(null,!1))}
7function pE(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,i=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(i.type==="Value"&&i.children.isEmpty){for(let n=t-this.tokenIndex;n<=0;n++)if(this.lookupType(n)===13){i.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(i)}return e}function _c(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}function Br(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}function EE(){let e=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}function ce(e,t){var i;return t=(i=xi[t])==null?t:i,(e instanceof HTMLElement?getComputedStyle(e):e.computedStyle).getPropertyValue(t).trim()}function Qt(e,t,i){return ce(e,t)===i}function kE(e,{selector:t,pseudoElementPart:i}){var n;let s=getComputedStyle(e,i),r=document.createElement("div"),a=document.createElement("style");r.id=`fake-pseudo-element-${Ne()}`;for(let u of Array.from(s)){let o=s.getPropertyValue(u);r.style.setProperty(u,o)}a.textContent+=`#${r.id}${i} { content: ${s.content}; }`,a.textContent+=`${t} { display: none !important; }`,(n=Ra(e))==null||n.append(a);let l=i==="::before"?"afterbegin":"beforeend";return e.insertAdjacentElement(l,r),{fakePseudoElement:r,sheet:a,computedStyle:s}}function AE(e){let t=e;for(;t;){if(Qt(t,"overflow","scroll"))return t;t=t.parentElement}return t}function CE(e){var t;let i=AE(e);return i===document.documentElement&&(i=null),(t=i)==null?{scrollTop:0,scrollLeft:0}:t}function IE(e,t){let{elementPart:i,pseudoElementPart:n}=e,s=[];if(n&&n!=="::before"&&n!=="::after")return s;let r=Si(t.roots,i);if(!n)return s.push(...r),s;for(let a of r){let{fakePseudoElement:l,sheet:u,computedStyle:o}=kE(a,e),c=l.getBoundingClientRect(),{scrollY:d,scrollX:h}=globalThis,f=CE(a);s.push({fakePseudoElement:l,computedStyle:o,removeFakePseudoElement(){l.remove(),u.remove()},contextElement:a,getBoundingClientRect(){let{scrollY:g,scrollX:p}=globalThis,{scrollTop:y,scrollLeft:m}=f;return DOMRect.fromRect({y:c.y+(d-g)+(f.scrollTop-y),x:c.x+(h-p)+(f.scrollLeft-m),width:c.width,height:c.height})}})}return s}function LE(e,t){let i=ce(e,"anchor-name");return t?i.split(",").map(n=>n.trim()).includes(t):!i}function PE(e,t){let i=ce(e,"anchor-scope");return i===t||i===Lh.All}function RE(e,t){let i=t.trim();if(i===":host")return!0;let n=/^:host\(\s*(.+?)\s*\)$/.exec(i);if(n)try{return e.matches(n[1])}catch{return!1}return!1}function Wn(e){return!!(e&&e.type==="Function"&&e.name==="anchor")}function nt(e,t=!1){return TE(e,{parseAtrulePrelude:!1,parseCustomProperty:!0,onParseError:i=>{t&&Ti.add(i)}})}function be(e){return Hv(e,{mode:"spec"})}function Ph(e){return e.type==="Declaration"}function xE(e,t){Rh.set(e,t)}function _E(e){let t=Rh.get(e);return t===void 0?Array.from(e.cssRules).map(i=>i.cssText).join(`
8`):t}function ME(e,t,i){if(!Dc.has(e)){let n=(i??[]).filter(s=>"adoptedStyleSheets"in s&&s.adoptedStyleSheets.includes(e));if(n.length){let s=new CSSStyleSheet({media:e.media,disabled:e.disabled});$n.call(s,t),Dc.add(s);for(let r of n)r.adoptedStyleSheets=r.adoptedStyleSheets.map(a=>a===e?s:a);return s}}return $n.call(e,t),e}function Ra(e){if(e instanceof ShadowRoot)return e;if(e instanceof Document)return e.head;let t=e.getRootNode();return t instanceof ShadowRoot?t:t instanceof Document?t.head:null}function DE(e){return e.toArray().reduce((t,i)=>i.type==="Operator"&&i.value===","?(t.push([]),t):(i.type==="Identifier"&&t[t.length-1].push(i),t),[[]])}function ia(e){return e?e.children.map(t=>{var i,n;let s;((i=t.children.last)==null?void 0:i.type)==="PseudoElementSelector"&&(t=Vn(t),s=be(t.children.last),t.children.pop());let r=be(t);return{selector:r+((n=s)==null?"":n),elementPart:r,pseudoElementPart:s}}).toArray():[]}function HE(){Ti.size>0&&(console.group(`The CSS anchor positioning polyfill was not applied due to ${Ti.size===1?"a CSS parse error":"CSS parse errors"}
8.`),Ti.forEach(e=>{console.warn(e.formattedMessage)}),console.groupEnd())}function VE(){Ti.clear()}function UE(e=[document]){if(typeof CSS>"u")return;let t=[...Object.values(xi),...OE];if(typeof CSS.registerProperty=="function"){if(Hc)return;for(let i of t)try{CSS.registerProperty({name:i,syntax:"*",inherits:!1})}catch{}Hc=!0}else if(typeof document<"u"){let[i]=t,n=t.map(s=>`${s}: initial;`).join(`
9  `);for(let s of e){let r=Ra(s);if(!r||[...r.querySelectorAll("style[data-generated-by-polyfill]")].some(l=>{var u;return(u=l.textContent)==null?void 0:u.includes(`${i}: initial`)}))continue;let a=document.createElement("style");a.setAttribute(_a,"true"),a.textContent=`*,
10::before,
11::after {
12  ${n}
13}`,r.append(a)}}}function BE(e,t){return Ph(e)&&xi[e.property]&&t?(t.children.appendData($($({},e),{},{property:xi[e.property]})),{updated:!0}):{updated:!1}}function FE(e,t){if(!Ph(e)||!t||!["inset","inset-block","inset-inline"].includes(e.property))return{updated:!1};let i=(n,s)=>{s&&t.children.appendData($($({},e),{},{property:n,value:{type:"Value",children:new Pi().fromArray([s])}}))};if(e.property==="inset"){let n=e.value.children.toArray(),[s,r,a,l]=(()=>{switch(n.length){case 1:return[n[0],n[0],n[0],n[0]];case 2:return[n[0],n[1],n[0],n[1]];case 3:return[n[0],n[1],n[2],n[1]];case 4:return[n[0],n[1],n[2],n[3]];default:return[]}})();i("top",s),i("right",r),i("bottom",a),i("left",l)}else if(e.property==="inset-block"){let n=e.value.children.toArray(),[s,r]=(()=>{switch(n.length){case 1:return[n[0],n[0]];case 2:return[n[0],n[1]];default:return[]}})();i("inset-block-start",s),i("inset-block-end",r)}else if(e.property==="inset-inline"){let n=e.value.children.toArray(),[s,r]=(()=>{switch(n.length){case 1:return[n[0],n[0]];case 2:return[n[0],n[1]];default:return[]}})();i("inset-inline-start",s),i("inset-inline-end",r)}return{updated:!0}}function qE(e,t){UE(t);for(let i of e){let n=!1,s=nt(i.css,!0);it(s,{visit:"Declaration",enter(r){var a;let l=(a=this.rule)==null?void 0:a.block,{updated:u}=FE(r,l),{updated:o}=BE(r,l);(o||u)&&(n=!0)}}),n&&(i.css=be(s),i.changed=!0)}return e.some(i=>i.changed===!0)}function WE(e){return!!((e.type==="text/css"||e.rel==="stylesheet")&&e.href)}function $E(e){let t=new URL(e.href,document.baseURI);if(WE(e)&&t.origin===location.origin)return t}function zE(e){return sa.apply(this,arguments)}function sa(){return sa=te(function*(e){return(yield Promise.all(e.map((function(){var t=te(function*(i){var n;if(!i.url)return i;if((n=i.el)!=null&&n.disabled)return null;try{let s=yield fetch(i.url.toString()),r=s.headers.get("content-type");if(!(r!=null&&r.startsWith("text/css"))){let l=Error(`Error loading ${i.url}: expected content-type "text/css", got "${r}".`);throw l.name=Vc,l}let a=yield s.text();return $($({},i),{},{css:a})}catch(s){if(s instanceof Error&&s.name===Vc)return console.warn(s),null;throw s}});return function(i){return t.apply(this,arguments)}})()))).filter(t=>t!==null)}),sa.apply(this,arguments)}function jE(e){var t;if(!qr){let i=["anchor",...Object.keys(xi)];qr=RegExp(`(?:^|;)\\s*(?:${i.join("|")})`,"i")}return qr.test((t=e.getAttribute("style"))==null?"":t)}function GE(e){let t=(e??Array.from(document.querySelectorAll("[style]"))).filter(n=>n instanceof HTMLElement&&jE(n)),i=[];return t.forEach(n=>{var s;let r="data-has-inline-styles",a=(s=n.getAttribute(r))==null?Ne(12):s;n.setAttribute(r,a);let l=`[${r}="${a}"] { ${n.getAttribute("style")} }`;i.push({el:n,css:l})}),i}function YE(e){let t=[],i=new Set;for(let n of e){let s=n.adoptedStyleSheets;if(s)for(let r of s)i.has(r)||(i.add(r),t.push({css:_E(r),sheet:r}))}return t}function KE(e){return ra.apply(this,arguments)}function ra(){return ra=te(function*(e){var t,i;let n=(t=e.elements)==null?Si(e.roots,"link, style"):t,s=[];n.filter(l=>l instanceof HTMLElement).filter(l=>!l.hasAttribute(_a)).forEach(l=>{if(l.tagName.toLowerCase()==="link"){let u=$E(l);u&&s.push({el:l,url:u})}l.tagName.toLowerCase()==="style"&&s.push({el:l,css:l.innerHTML})});let r=GE(e.excludeInlineStyles?(i=e.elements)==null?[]:i:void 0),a=e.elements?[]:YE(e.roots);return yield zE([...s,...r,...a])}),ra.apply(this,arguments)}function XE(e){for(let t of Qn){let i=ce(e,t);if(["%","stretch","fit-content","-webkit-fill-available"].some(n=>i.includes(n)))return!0}for(let t of Xn){let i=ce(e,t);if(["%","auto"].some(n=>i.includes(n)))return!0}for(let t of vh)if(ce(e,t).includes("%"))return!0;for(let t of Pa){let i=ce(e,t);if(["stretch","anchor-center"].some(n=>i.includes(n)))return!0}return!1}function Oh(e){return QE.includes(e)}function la(e){let t=e.split("-");for(let i of t){if(sw.includes(i))return"block";if(rw.includes(i))return"inline"}return"ambiguous"}function aw(e,t){return t[0].includes(e[0])&&t[1].includes(e[1])||t[0].includes(e[1])&&t[1].includes(e[0])}function lw(e){for(let t of ow)if(aw(e,t))return!0;return!1}function $c([e,t]){return e===0&&t===3?"center":e===0?"end":t===3?"start":"center"}function hw(e){return e.type==="Declaration"&&e.property==="position-area"}function pw(e){let t=e.value.children.toArray().map(({name:i})=>i);return t.length===1&&(la(t[0])==="ambiguous"?t.push(t[0]):t.push("span-all")),t}function fw(e){if(!hw(e))return;let t=pw(e);if(!lw(t))return;let i={};switch(la(t[0])){case"block":i.block=t[0],i.inline=t[1];break;case"inline":i.inline=t[0],i.block=t[1];break;case"ambiguous":la(t[1])=="block"?(i.block=t[1],i.inline=t[0]):(i.inline=t[1],i.block=t[0])}return{values:i,grid:{block:Bc[i.block],inline:Bc[i.inline]},selectorUUID:`--pa-declaration-${xh(12)}`}}function gw(e,t,i=!0){let n=(s,r)=>{t.children.appendData({type:"Declaration",property:s,value:{type:"Raw",value:r},important:!1})};i==="auto"?(n("justify-self",`var(${st.get("justify-self")}
13, normal)`),n("align-self",`var(${st.get("align-self")}, normal)`),At.forEach(s=>n(s,`var(${st.get(s)}, auto)`))):(i?["justify-self","align-self"]:[...At]).forEach(s=>n(s,`var(${st.get(s)})`)),n(_h,e.selectorUUID)}function mw(e,t){var i;let n;if(((i=e.parentElement)==null?void 0:i.tagName)===Uc)n=e.parentElement;else{n=document.createElement(Uc),n.style.display="grid",n.style.position=na(e);let s=getComputedStyle(e).pointerEvents;if(n.style.pointerEvents="none",e.style.pointerEvents=s,e.hasAttribute("popover")){let r=getComputedStyle(e);["top","right","bottom","left"].forEach(a=>{let l=r[a];l&&l!=="auto"&&parseFloat(l)!==0&&n.style.setProperty(`padding-${a}`,l)}),e.style.inset="auto"}At.forEach(r=>{n.style.setProperty(r,`var(${xa.get(r)})`)}),e.insertAdjacentElement("beforebegin",n),n.appendChild(e)}return n.setAttribute(`${oa}${t}`,""),n}function bw(e,t){e.setAttribute(`${Nh}${t}`,"")}function yw(e,t,i){return ca.apply(this,arguments)}function ca(){return ca=te(function*(e,t,i,n=!0){let s=`--pa-target-${xh(12)}`,r=yield uw(t.grid,e),a=dw(r),l;if(n){let c=Dh(t.grid.block[2],t.grid.inline[2]);l=[P.LogicalSelf,P.PhysicalSelf].includes(c)?r:t.grid}else l=r;
13let u={block:$c([l.block[0],l.block[1]]),inline:$c([l.inline[0],l.inline[1]])},o;return n?o=mw(e,s):bw(e,s),{insets:a,alignments:u,targetUUID:s,targetEl:e,anchorEl:i,wrapperEl:o,values:t.values,grid:t.grid,selectorUUID:t.selectorUUID}}),ca.apply(this,arguments)}function vw(e,t){return`
14    [${aa}="${t}"][${oa}${e}] {
15      ${At.map(i=>`${xa.get(i)}: var(${e}-${i});`).join(`
16      `)}
17    }
18    [${aa}="${t}"][${oa}${e}] > * {
19      ${st.get("justify-self")}: var(${e}-justify-self);
20      ${st.get("align-self")}: var(${e}-align-self);
21    }
22  `.replaceAll(`
23`,"")}function Ew(e,t){return`
24    [${Mh}="${t}"][${Nh}${e}] {
25      ${At.map(i=>`${st.get(i)}: var(${e}-${i});`).join(`
26      `)}
27    }
28  `.replaceAll(`
29`,"")}function Tw(e){return e.type==="Declaration"}function kw(e){return e.type==="Declaration"&&e.property==="position-try-fallbacks"}function Aw(e){return e.type==="Declaration"&&e.property==="position-try-order"}function Cw(e){return e.type==="Declaration"&&e.property==="position-try"}function Iw(e){return e.type==="Atrule"&&e.name==="position-try"}function Lw(e){return Sw.includes(e)}function Pw(e){return ww.includes(e)}function Rw(e,t){let i=document.querySelector(e);if(i){let n=_w(i);return t.forEach(s=>{n=Hh(n,s)}),n}}function xw(e,t){let i=e.declarations;return t.forEach(n=>{i=Hh(i,n)}),i}function _w(e){let t={};return Eh.forEach(i=>{let n=ce(e,`--${i}-${Jt}`);n&&(t[i]=n)}),t}function Dw(e,t){return Mw[t][e]||e}function Hw(e,t){return Nw[t][e]||e}function Vw(e,t){if(t==="flip-start")return e;{let i=Ow[t];return e.split("-").map(n=>i[n]||n).join("-")}}function Uw(e,t,i){if(e==="margin"){let[n,s,r,a]=t.children.toArray();i==="flip-block"?a?t.children.fromArray([r,s,n,a]):r&&t.children.fromArray([r,s,n]):i==="flip-inline"&&a&&t.children.fromArray([n,a,r,s])}else if(e==="margin-block"){let[n,s]=t.children.toArray();i==="flip-block"&&s&&t.children.fromArray([s,n])}else if(e==="margin-inline"){let[n,s]=t.children.toArray();i==="flip-inline"&&s&&t.children.fromArray([s,n])}}function Hh(e,t){let i={};return Object.entries(e).forEach(([n,s])=>{let r=n,a=Bw(r,s),l=Dw(r,t);l!==r&&(i[r]!=null||(i[r]="revert")),it(a,{visit:"Function",enter(u){Wn(u)&&u.children.forEach(o=>{ki(o)&&Sh(o.name)&&(o.name=Hw(o.name,t))})}}
29),r==="position-area"&&a.children.forEach(u=>{ki(u)&&Oh(u.name)&&(u.name=Vw(u.name,t))}),r.startsWith("margin")&&Uw(r,a,t),i[l]=be(a)}),i}function Vh(e){let t=DE(e),i=[];return t.forEach(n=>{let s={atRules:[],tactics:[],positionAreas:[]};n.forEach(r=>{Lw(r.name)?s.tactics.push(r.name):r.name.startsWith("--")?s.atRules.push(r.name):Oh(r.name)&&s.positionAreas.push(r.name)}),s.positionAreas.length?i.push({positionArea:s.positionAreas[0],type:"position-area"}):s.atRules.length&&s.tactics.length?i.push({tactics:s.tactics,atRule:s.atRules[0],type:"at-rule-with-try-tactic"}):s.atRules.length?i.push({atRule:s.atRules[0],type:"at-rule"}):s.tactics.length&&i.push({tactics:s.tactics,type:"try-tactic"})}),i}function Fw(e){return kw(e)&&e.value.children.first?Vh(e.value.children):[]}function qw(e){if(Cw(e)&&e.value.children.first){let t=Vn(e),i,n=t.value.children.first.name;n&&Pw(n)&&(i=n,t.value.children.shift());let s=Vh(t.value.children);return{order:i,options:s}}return{}}function Ww(e){return Aw(e)&&e.value.children.first?{order:e.value.children.first.name}:{}}function $w(e){let{order:t,options:i}=qw(e);if(t||i)return{order:t,options:i};let{order:n}=Ww(e),s=Fw(e);return n||s?{order:n,options:s}:{}}function zw(e){return Ri(e.property)||Tv(e.property)||yh(e.property)||kv(e.property)||["position-anchor","position-area"].includes(e.property)}function jw(e){var t,i;if(Iw(e)&&(t=e.prelude)!=null&&t.value&&(i=e.block)!=null&&i.children){let n=e.prelude.value,s=e.block.children.filter(r=>Tw(r)&&zw(r));return{name:n,tryBlock:{uuid:`${n}-try-${Ne(12)}`,declarations:Object.fromEntries(s.map(r=>[r.property,be(r.value)]))}}}return{}}function Gw(e){let t={},i={},n={};for(let s of e)it(nt(s.css),{visit:"Atrule",enter(r){let{name:a,tryBlock:l}=jw(r);a&&l&&(t[a]=l)}});for(let s of e){let r=!1,a=new Set,l=nt(s.css);it(l,{visit:"Declaration",enter(u){var o;let c=ia((o=this.rule)==null?void 0:o.prelude);if(!c.length)return;let{order:d,options:h}=$w(u);c.forEach(({selector:f})=>{let g={};d&&(g.order=d);let p=new Set;if(h?.forEach(m=>{let b;if(m.type==="at-rule")b=m.atRule;else if(m.type==="try-tactic"){b=`${f}-${m.tactics.join("-")}`;let T=Rw(f,m.tactics);T&&(t[b]={uuid:`${f}-${m.tactics.join("-")}-try-${Ne(12)}`,declarations:T})}else if(m.type==="at-rule-with-try-tactic"){b=`${f}-${m.atRule}-${m.tactics.join("-")}`;let T=t[m.atRule],L=xw(T,m.tactics);L&&(t[b]={uuid:`${f}-${m.atRule}-${m.tactics.join("-")}-try-${Ne(12)}`,declarations:L})}if(b&&t[b]){let T=`[data-anchor-polyfill="${t[b].uuid}"]`;if(i[T]!=null||(i[T]=[]),i[T].push(f),!p.has(b)&&(p.add(b),g.fallbacks!=null||(g.fallbacks=[]),g.fallbacks.push(t[b])),!a.has(b)){var v;a.add(b),(v=this.stylesheet)==null||v.children.prependData({type:"Rule",prelude:{type:"Raw",value:T},block:{type:"Block",children:new Pi().fromArray(Object.entries(t[b].declarations).map(([L,M])=>({type:"Declaration",important:!0,property:L,value:{type:"Raw",value:M}})))}}),r=!0}}}),Object.keys(g).length>0)if(n[f]){if(g.order&&(n[f].order=g.order),g.fallbacks){var y;(y=n[f]).fallbacks!=null||(y.fallbacks=[]),n[f].fallbacks.push(...g.fallbacks)}}else n[f]=g})}}),r&&(s.css=be(l),s.changed=!0)}return{fallbackTargets:i,validPositions:n}}function Yw(e,t){return!e||e===t?!1:Uh(e)?e.document.contains(t):e.contains(t)}function Uh(e){return!!(e&&e===e.window)}function Kw(e){return Qt(e,"position","fixed")}function ua(e){return!!(e&&(Kw(e)||Qt(e,"position","absolute")))}function zc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING}function Xw(e){return da.apply(this,arguments)}function da(){return da=te(function*(e){return yield Me.getOffsetParent(e)}),da.apply(this,arguments)}function $r(e){return ha.apply(this,arguments)}function ha(){return ha=te(function*(e){if(!["absolute","fixed"].includes(ce(e,"position")))return yield Xw(e);let t=e.parentElement;for(;t;){if(!Qt(t,"position","static")&&Qt(t,"display","block"))return t;t=t.parentElement}return window}),ha.apply(this,arguments)}function Qw(e,t,i,n){return pa.apply(this,arguments)}function pa(){return pa=te(function*(e,t,i,n){let s=yield $r(e),r=yield $r(i);if(!(Yw(r,e)||Uh(r))||s===r&&!(!ua(e)||zc(e,i)))return!1;if(s!==r){let a,l=[];for(a=s;a&&a!==r&&a!==window;)l.push(a),a=yield $r(a);let u=l[l.length-1];if(u instanceof HTMLElement&&!(!ua(u)||zc(u,i)))return!1}{let a=e.parentElement;for(;a;){if(Qt(a,"content-visibility","hidden"))return!1;a=a.parentElement}}return!(t&&n&&jc(e,t,n)!==jc(i,t,n))}),pa.apply(this,arguments)}function jc(e,t,i){for(;!(e.matches(i)&&PE(e,t));){if(!e.parentElement)return null;e=e.parentElement}return e}function Zw(e,t,i,n,s){return fa.apply(this,arguments)}function fa(){return fa=te(function*(e,t,i,n,s){if(!(e instanceof HTMLElement&&i.length&&ua(e)))return null;let r=i.flatMap(l=>IE(l,s)).filter(l=>LE(l,t)),a=n.map(l=>l.selector).join(",")||null;for(let l=r.length-1;l>=0;l--){let u=r[l],o="fakePseudoElement"in u;if(yield Qw(o?u.fakePseudoElement:u,t,e,a))return o&&u.removeFakePseudoElement(),u}return null}),fa.apply(this,arguments)}function Jw(e){return e.type==="Declaration"&&e.property==="anchor-name"}function eS(e){return e.type==="Declaration"&&e.property==="anchor-scope"}function ga(e){return!!(e&&e.type==="Function"&&e.name==="anchor-size")}function On(e){return!!(e&&e.type==="Function"&&e.name==="var")}function ki(e){return!!(e.type==="Identifier"&&e.name)}function tS(e){return!!(e.type==="Percentage"&&e.value)}function Gc(e,t){let i,n,s,r="",a=!1,l,u=[];
29e.children.toArray().forEach(h=>{if(a){r=`${r}${be(h)}`;return}if(h.type==="Operator"&&h.value===","){a=!0;return}u.push(h)});let[o,c]=u;if(c||(c=o,o=void 0),o&&(ki(o)&&o.name.startsWith("--")?i=o.name:On(o)&&o.children.first&&(l=o.children.first.name)),c)if(Wn(e)){if(ki(c)&&Sh(c.name))n=c.name;else if(tS(c)){let h=Number(c.value);n=Number.isNaN(h)?void 0:h}}else ga(e)&&ki(c)&&Lv(c.name)&&(s=c.name);let d=`--anchor-${Ne(12)}`;return t&&(Object.assign(e,{type:"Raw",value:`var(${d})`,children:null}),Reflect.deleteProperty(e,"name")),{anchorName:i,anchorSide:n,anchorSize:s,fallbackValue:r,customPropName:l,uuid:d}}function Yc(e){return e.value.children.map(({name:t})=>t)}function iS(){Dn={},wi={},wt={},Ai={},Et={}}function nS(e,t){if((Wn(e)||ga(e))&&t){if(t.property.startsWith("--")){var i;let n=be(t.value),s=Gc(e,!0);return Ai[s.uuid]=n,wt[t.property]=[...(i=wt[t.property])==null?[]:i,s],{changed:!0}}if(Wn(e)&&Ri(t.property)||ga(e)&&wh(t.property)){let n=Gc(e,!0);return{prop:t.property,data:n,changed:!0}}}return{}}function sS(e){let t=e.getAttribute("style");return t?/(?:^|;)\s*position-anchor\s*:/i.test(t):!1}function Kc(e,t,i,n,s){return ma.apply(this,arguments)}function ma(){return ma=te(function*(e,t,i,n,s){let r=t?.anchorName,a=t?.customPropName,l=!1;if(e&&!r){let f=ce(e,"position-anchor");f?(r=f,l=sS(e)):a&&(r=ce(e,a))}let u=r&&n[r]||[],o=r&&s[Lh.All]||[],c=r&&s[r]||[],d=i.roots,h=e?.getRootNode();return l&&(h instanceof Document||h instanceof ShadowRoot)&&!d.includes(h)&&(d=[...d,h]),yield Zw(e,r||null,u,[...o,...c],{roots:d})}),ma.apply(this,arguments)}function rS(e,t){return ba.apply(this,arguments)}function ba(){return ba=te(function*(e,t){let i={},n={},s=t.positionAreaContainingBlock;iS();let{fallbackTargets:r,validPositions:a}=Gw(e);for(let R of e){let B=!1,I=nt(R.css);it(I,function(N){var H;let O=ia((H=this.rule)==null?void 0:H.prelude);if(Jw(N)&&O.length)for(let G of Yc(N)){var U;(U=Dn)[G]!=null||(U[G]=[]),Dn[G].push(...O)}if(eS(N)&&O.length)for(let G of Yc(N)){var q;(q=wi)[G]!=null||(q[G]=[]),wi[G].push(...O)}let{prop:C,data:z,changed:K}=nS(N,this.declaration);if(C&&z&&O.length)for(let{selector:G}of O){var X,ue;i[G]=$($({},i[G]),{},{[C]:[...(X=(ue=i[G])==null?void 0:ue[C])==null?[]:X,z]})}let Q;if(this.block&&(Q=fw(N),Q)){gw(Q,this.block,s);for(let{selector:G}of O){var ee;n[G]=[...(ee=n[G])==null?[]:ee,Q]}}(K||Q)&&(B=!0)}),B&&(R.css=be(I),R.changed=!0)}let l=new Set(Object.keys(wt)),u={},o=R=>{var B,I;let N=[],H=new Set((B=(I=u[R])==null?void 0:I.names)==null?[]:B);for(;H.size>0;)for(let q of H){var O,U;N.push(...(O=wt[q])==null?[]:O),H.delete(q),(U=u[q])!=null&&(U=U.names)!=null&&U.length&&u[q].names.forEach(C=>H.add(C))}return N};for(;l.size>0;){let R=[];for(let B of e){let I=!1,N=nt(B.css);it(N,{visit:"Function",enter(H){var O;let U=(O=this.rule)==null?void 0:O.prelude,q=this.declaration,C=q?.property;if(U?.children.isEmpty===!1&&On(H)&&q&&C&&H.children.first&&l.has(H.children.first.name)&&C.startsWith("--")){var z;let K=H.children.first,X=(z=wt[K.name])==null?[]:z,ue=o(K.name);if(!(X.length||ue.length))return;let Q=`${K.name}-anchor-${Ne(12)}`,ee=be(q.value);Ai[Q]=ee,u[C]||(u[C]={names:[],uuids:[]});let G=u[C];G.names.includes(K.name)||G.names.push(K.name),G.uuids.push(Q),R.push(C),K.name=Q,I=!0}}}),I&&(B.css=be(N),B.changed=!0)}l.clear(),R.forEach(B=>l.add(B))}for(let R of e){let B=!1,I=nt(R.css);it(I,{visit:"Function",enter(N){var H;let O=(H=this.rule)==null?void 0:H.prelude,U=this.declaration,q=U?.property;if(O?.children.isEmpty===!1&&On(N)&&U&&q&&N.children.first&&(Ri(q)||yh(q))){var C;let ee=N.children.first,G=(C=wt[ee.name])==null?[]:C,Fe=o(ee.name);if(!(G.length||Fe.length))return;let at=`${q}-${Ne(12)}`;if(Fe.length){let ze=new Set([ee.name]);for(;ze.size>0;)for(let ot of ze){var z,K,X;let de=u[ot];if(de!=null&&(z=de.names)!=null&&z.length&&de!=null&&(K=de.uuids)!=null&&K.length)for(let Te of de.names)for(let je of de.uuids)Et[je]=$($({},Et[je]),{},{[at]:`${Te}-${at}`});ze.delete(ot),de!=null&&(X=de.names)!=null&&X.length&&de.names.forEach(Te=>ze.add(Te))}}let _i=ia(O);for(let ze of[...G,...Fe]){let ot=$({},ze),de=`--anchor-${Ne(12)}-${q}`,Te=ot.uuid;ot.uuid=de;for(let{selector:je}of _i){var ue,Q;i[je]=$($({},i[je]),{},{[q]:[...(ue=(Q=i[je])==null?void 0:Q[q])==null?[]:ue,ot]})}Et[Te]=$($({},Et[Te]),{},{[at]:de})}ee.name=`${ee.name}-${at}`,B=!0}}}),B&&(R.css=be(I),R.changed=!0)}if(Object.keys(Et).length>0)for(let R of e){let B=!1,I=nt(R.css);it(I,{visit:"Function",enter(N){var H,O;if(On(N)&&(H=N.children.first)!=null&&(H=H.name)!=null&&H.startsWith("--")&&(O=this.declaration)!=null&&(O=O.property)!=null&&O.startsWith("--")&&this.block){let U=N.children.first,q=Et[U.name];if(q)for(let[C,z]of Object.entries(q))this.block.children.appendData({type:"Declaration",important:!1,property:`${this.declaration.property}-${C}`,value:{type:"Raw",value:be(this.declaration.value).replace(`var(${U.name})`,`var(${z})`)}}),B=!0;Ai[U.name]&&(this.declaration.value={type:"Raw",value:Ai[U.name]},B=!0)}}}),B&&(R.css=be(I),R.changed=!0)}let c=Dn,d=wi,h=new Map;for(let[R,B]of Object.entries(i)){var f;let I;I=R.startsWith("[data-anchor-polyfill=")&&(f=r[R])!=null&&f.length?Si(t.roots,r[R].join(",")):Si(t.roots,R);for(let[N,H]of Object.entries(B))for(let O of H)for(let U of I){var g,p,y,m,b;let q=yield Kc(U,O,{roots:t.roots},c,d),C=`--anchor-${Ne(12)}`;h.set(U,$($({},(g=h.get(U))==null?{}:g),{},{[O.uuid]:C})),U.setAttribute("style",`${O.uuid}: var(${C}); ${(p=U.getAttribute("style"))==null?"":p}`),a[R]=$($({},a[R]),{},{declarations:$($({},(y=a[R])==null?void 0:y.declarations),{},{[N]:[...(m=(b=a[R])==null||(b=b.declarations)==null?void 0:b[N])==null?[]:m,$($({},O),{},{anchorEl:q,targetEl:U,uuid:C})]})})}}let v=new Map,T=Object.entries(n).map(([R,B])=>({targetSel:R,positions:B,targets:Si(t.roots,R)}));for(let{targetSel:R,positions:B,targets:I}of T)for(let N of I){let H=yield Kc(N,null,{roots:t.roots},c,d),O=s==="auto"?XE(N):s;for(let U of B){var L,M,D;let q=yield yw(N,U,H,O),C=O?vw:Ew,z=Ra(N);if(z){var j;v.set(z,((j=v.get(z))==null?"":j)+C(q.targetUUID,U.selectorUUID))}a[R]=$($({},a[R]),{},{declarations:$($({},(L=a[R])==null?void 0:L.declarations),{},{"position-area":[...(M=(D=a[R])==null||(D=D.declarations)==null?void 0:D["position-area"])==null?[]:M,q]})})}}return{rules:a,inlineStyles:h,anchorScopes:wi,positionAreaStyles:v}}),ba.apply(this,arguments)}function Xc(e,t,i){let n=[];for(let{el:r,css:a,changed:l,sheet:u}of e){let o={el:r,css:a,changed:!1,sheet:u};if(l){if(u)o.sheet=ME(u,a,i);else if(r?.tagName.toLowerCase()==="style")r.innerHTML=a;else if(r instanceof HTMLLinkElement){let c=document.createElement("style");c.textContent=a;for(let d of r.getAttributeNames())if(!d.startsWith("on")&&!aS.includes(d)){let h=r.getAttribute(d);h!==null&&c.setAttribute(d,h)}r.hasAttribute("href")&&c.setAttribute("data-original-href",r.getAttribute("href")),r.insertAdjacentElement("beforebegin",c),r.remove(),o.el=c}else if(r!=null&&r.hasAttribute("data-has-inline-styles")){let c=r.getAttribute("data-has-inline-styles");if(c){var s;let d=`[data-has-inline-styles="${c}"]{`,h=a.slice(d.length,-1),f=t?.get(r);if(f)for(let[p,y]of Object.entries(f))h=`${p}: var(${y}); ${h}`;let g=((s=r.getAttribute("style"))==null?"":s).split(";").map(p=>p.trim()).filter(p=>{let y=p.slice(0,p.indexOf(":")).trim();return y.startsWith("--anchor-")&&!h.includes(`${y}:`)});g.length&&(h=`${g.join("; ")}; ${h}`),r.setAttribute("style",h)}}}n.push(o)}return n}function oS(e){for(let[t,i]of e){if(!i)continue;let n=document.createElement("style");n.setAttribute(_a,"true"),n.textContent=i,t.append(n)}}function pS(e){return ya.apply(this,arguments)}function ya(){return ya=te(function*(e,t=!1){let i=document.documentElement;for(let[n,s]of Object.entries(e))for(let r of s){let a=r.anchorEl,l=r.targetEl;if(a&&l){let u=na(l);if(dS(r)){let o=r.wrapperEl,c=o??l,d=(function(){var h=te(function*(f,g,p){return f===0?"0px":yield zr({targetEl:c,targetProperty:g,anchorRect:p,anchorSide:f})});return function(f,g,p){return h.apply(this,arguments)}})();Yr(a,c,te(function*(){let h=ce(l,_h);o?o.setAttribute(aa,h):l.setAttribute(Mh,h);let f=yield Me.getElementRects({reference:a,floating:c,strategy:na(c)}),g=r.insets,p=yield d(g.block[0],"top",f.reference),y=yield d(g.block[1],"bottom",f.reference),m=yield d(g.inline[0],"left",f.reference),b=yield d(g.inline[1],"right",f.reference),v,T,L,M;if(o)[v,T,L,M]=[p,y,m,b],i.style.setProperty(`${r.targetUUID}-justify-self`,r.alignments.inline),i.style.setProperty(`${r.targetUUID}-align-self`,r.alignments.block);else{let D=yield Zn(l),j=Bh(l);[v,T]=eu(r.alignments.block,p,y,D.clientHeight,f.floating.height+j.top+j.bottom),[L,M]=eu(r.alignments.inline,m,b,D.clientWidth,f.floating.width+j.left+j.right)}i.style.setProperty(`${r.targetUUID}-top`,v||null),i.style.setProperty(`${r.targetUUID}-left`,L||null),i.style.setProperty(`${r.targetUUID}-right`,M||null),i.style.setProperty(`${r.targetUUID}-bottom`,T||null)}),{animationFrame:t})}else Yr(a,l,te(function*(){let o=yield Me.getElementRects({reference:a,floating:l,strategy:u}),c=yield zr({targetEl:l,targetProperty:n,anchorRect:o.reference,anchorSide:r.anchorSide,anchorSize:r.anchorSize,fallback:r.fallbackValue});i.style.setProperty(r.uuid,c)}),{animationFrame:t})}else if(hS(r)){let u=yield zr({targetProperty:n,anchorSide:r.anchorSide,anchorSize:r.anchorSize,fallback:r.fallbackValue});i.style.setProperty(r.uuid,u)}}}),ya.apply(this,arguments)}function tu(e,t){let i=e.getBoundingClientRect(),n=Bh(e),s={top:i.top-n.top,bottom:i.bottom+n.bottom,left:i.left-n.left,right:i.right+n.right},r=t===document.documentElement?{top:0,left:0,right:document.documentElement.clientWidth,bottom:document.documentElement.clientHeight}:(()=>{let a=t.getBoundingClientRect();return{top:a.top+Rn(t,"top"),left:a.left+Rn(t,"left"),right:a.right-Rn(t,"right"),bottom:a.bottom-Rn(t,"bottom")}})();return{top:r.top-s.top,bottom:s.bottom-r.bottom,left:r.left-s.left,right:s.right-r.right}}function fS(e,t){return va.apply(this,arguments)}function va(){return va=te(function*(e,t,i=!1){if(!t.length)return;let n=document.querySelectorAll(e);for(let s of n){let r=!1,a=yield Zn(s);Yr({},s,te(function*(){if(r)return;r=!0,s.removeAttribute("data-anchor-polyfill");let l=tu(s,a);if(Object.values(l).every(u=>u<=0)){s.removeAttribute("data-anchor-polyfill-last-successful"),r=!1;return}for(let[u,{uuid:o}]of t.entries()){s.setAttribute("data-anchor-polyfill",o);let c=tu(s,a);if(Object.values(c).every(d=>d<=0)){s.setAttribute("data-anchor-polyfill-last-successful",o),r=!1;break}if(u===t.length-1){let d=s.getAttribute("data-anchor-polyfill-last-successful");d?s.setAttribute("data-anchor-polyfill",d):s.removeAttribute("data-anchor-polyfill"),r=!1;break}}}),{animationFrame:i,layoutShift:!1})}}),va.apply(this,arguments)}function gS(e){return Ea.apply(this,arguments)}function Ea(){return Ea=te(function*(e,t=!1){for(let s of Object.values(e)){var i;yield pS((i=s.declarations)==null?{}:i,t)}for(let[s,r]of Object.entries(e)){var n;yield fS(s,(n=r.fallbacks)==null?[]:n,t)}}),Ea.apply(this,arguments)}function mS(e={}){var t;let i=typeof e=="boolean"?{useAnimationFrame:e}:e,n=i.useAnimationFrame===void 0?!!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME:i.useAnimationFrame;return Array.isArray(i.elements)||(i.elements=void 0),(!Array.isArray(i.roots)||i.roots.length===0)&&(i.roots=[document]),Object.assign(i,{useAnimationFrame:n,positionAreaContainingBlock:(t=i.positionAreaContainingBlock)==null||t})}function Fh(e){return wa.apply(this,arguments)}function wa(){return wa=te(function*(e){let t=mS(e??window.ANCHOR_POSITIONING_POLYFILL_OPTIONS),i=yield KE(t),n={},s,r;VE();try{qE(i,t.roots)&&(i=Xc(i,void 0,t.roots));let a=yield rS(i,t);n=a.rules,s=a.inlineStyles,r=a.positionAreaStyles}catch(a){throw HE(),a}return Object.values(n).length&&(Xc(i,s,t.roots),oS(r),yield gS(n,t.useAnimationFrame)),n}),wa.apply(this,arguments)}function Wh(e){var t,i;return Fh($($({},(t=(i=qh)==null?window.ANCHOR_POSITIONING_POLYFILL_OPTIONS:i)==null?{}:t),{},{elements:void 0,roots:[e]}))}function bS(){if(su||typeof CustomElementRegistry>"u")return;su=!0;let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,i,n){let s=i.prototype,r=s.connectedCallback;return s.connectedCallback=function(){r?.call(this);let a=Sa.get(this);a&&(Sa.delete(this),Wh(a))},e.call(this,t,i,n)}}function yS(e){let t=e.host;iu.has(t)||(iu.add(t),t.isConnected?queueMicrotask(()=>{Wh(e)}):Sa.set(t,e))}function vS(e){if(qh=e,bS(),CSSStyleSheet.prototype.replaceSync===$n&&(CSSStyleSheet.prototype.replaceSync=function(n){return xE(this,n),$n.call(this,n)}),nu)return;let t=Object.getOwnPropertyDescriptor(ShadowRoot.prototype,"adoptedStyleSheets"),i=t?.set;t&&i&&(Object.defineProperty(ShadowRoot.prototype,"adoptedStyleSheets",$($({},t),{},{set(n){i.call(this,n),n.length>0&&yS(this)}})),nu=!0)}var Yl,x,jr,jt,Hn,An,We,om,lm,bt,Cr,um,gm,Sm,Me,Wt,Pi,Am,Kr,Qr,xm,ec,_m,tc,Mm,Pe,Re,yi,xn,tt,_e,Nm,sc,Zr,vu,Eu,Hm,Jr,Vm,Um,Bm,Su,Ia,vi,jm,He,we,_n,vt,Gm,Ym,Km,Xm,Zm,Jm,e0,t0,i0,n0,s0,r0,a0,Pu,Nn,o0,ea,l0,d0,h0,p0,f0,m0,b0,y0,v0,E0,w0,S0,T0,k0,A0,C0,I0,L0,P0,R0,x0,hc,_0,M0,N0,O0,D0,H0,V0,U0,B0,F0,q0,W0,$0,z0,j0,Ku,G0,Y0,K0,X0,Q0,fc,tb,ib,nb,ab,ob,lb,cb,ub,db,hb,pb,fb,gb,mb,bb,yb,vb,wb,gc,Sb,mc,Tb,kb,Ab,Cb,Ib,Lb,Pb,Rb,xb,_b,Mb,Nb,Ob,Db,Hb,Vb,Ub,Bb,Fb,qb,Wb,$b,zb,jb,Gb,Yb,Kb,Xb,Qb,Zb,Jb,ey,ty,iy,ny,sy,ry,ay,oy,ly,cy,uy,dy,hy,py,fy,gy,my,by,yy,vy,Ey,wy,Sy,Ty,ky,Ay,Cy,Iy,yc,Ly,Py,Ry,_y,My,Oy,Dy,Hy,Vy,Uy,By,Fy,qy,Wy,$y,zy,jy,Gy,Yy,Ky,Xy,Qy,Zy,Jy,ev,tv,iv,nv,sv,rv,av,Sc,ov,lv,cv,lh,ch,ta,hv,pv,fv,gv,mv,bv,yv,vv,Ev,wv,Sv,it,La,Xn,Qn,vh,Pa,Eh,Av,Cv,Iv,Tc,kc,Rv,xv,Hr,Th,_v,Mv,Ah,Nv,Hv,Ac,Uv,Bv,$t,qv,Wv,Vr,Lc,Pc,$v,zv,Kv,Xv,Rc,Qv,Zv,Jv,eE,tE,iE,nE,sE,r
29E,xc,aE,oE,lE,dE,fE,gE,mE,bE,yE,Mc,vE,yt,Fr,wE,SE,Pn,TE,Ih,Ne,Lh,Zn,Si,Nc,Oc,Jt,Ti,$n,Rh,Dc,At,NE,st,xa,OE,na,xi,_a,Hc,Vc,qr,xh,_h,aa,Mh,oa,Nh,Uc,P,QE,Bc,ZE,JE,ew,tw,iw,nw,Fc,qc,sw,rw,ow,Wc,cw,Wr,Dh,uw,dw,ww,Sw,Mw,Nw,Ow,Bw,Dn,wi,wt,Ai,Et,aS,lS,cS,Qc,uS,Zc,Jc,Rn,Bh,zr,dS,hS,eu,iu,nu,qh,Sa,su,ES,zh=np(()=>{"use strict";Yl=Object.defineProperty,x=(e,t)=>{let i={};for(var n in e)Yl(i,n,{get:e[n],enumerable:!0});return t||Yl(i,Symbol.toStringTag,{value:"Module"}),i},jr=Math.min,jt=Math.max,Hn=Math.round,An=Math.floor,We=e=>({x:e,y:e});om=/transform|translate|scale|rotate|perspective|filter/,lm=/paint|layout|strict|content/,bt=e=>!!e&&e!=="none";um=We(0);gm=25;Sm=(function(){var e=te(function*(t){let i=this.getOffsetParent||du,n=this.getDimensions,s=yield n(t.floating);return{reference:wm(t.reference,yield i(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}});return function(t){return e.apply(this,arguments)}})();Me={convertOffsetParentRelativeRectToViewportRelativeRect:hm,getDocumentElement:$e,getClippingRect:vm,getOffsetParent:du,getElementRects:Sm,getClientRects:pm,getDimensions:Em,getScale:Gt,isElement:Ue,isRTL:Tm};Wt=null,Pi=class xe{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return xe.createItem(t)}allocateCursor(t,i){let n;return Wt===null?n={prev:t,next:i,cursor:this.cursor}:(n=Wt,Wt=Wt.cursor,n.prev=t,n.next=i,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=Wt,Wt=t}updateCursors(t,i,n,s){let{cursor:r}=this;for(;r!==null;)r.prev===t&&(r.prev=i),r.next===n&&(r.next=s),r=r.cursor}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data}get size(){let t=0;for(let i=this.head;i!==null;i=i.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let i=null;this.head=null;for(let n of t){let s=xe.createItem(n);i===null?this.head=s:i.next=s,s.prev=i,i=s}return this.tail=i,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,i=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let s=n.next;n.next=s.next,t.call(i,s.data,s,this)}this.releaseCursor()}forEachRight(t,i=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let s=n.prev;n.prev=s.prev,t.call(i,s.data,s,this)}this.releaseCursor()}reduce(t,i,n=this){let s=this.allocateCursor(null,this.head),r=i,a;for(;s.next!==null;)a=s.next,s.next=a.next,r=t.call(n,r,a.data,a,this);return this.releaseCursor(),r}reduceRight(t,i,n=this){let s=this.allocateCursor(this.tail,null),r=i,a;for(;s.prev!==null;)a=s.prev,s.prev=a.prev,r=t.call(n,r,a.data,a,this);return this.releaseCursor(),r}some(t,i=this){for(let n=this.head;n!==null;n=n.next)if(t.call(i,n.data,n,this))return!0;return!1}map(t,i=this){let n=new xe;for(let s=this.head;s!==null;s=s.next)n.appendData(t.call(i,s.data,s,this));return n}filter(t,i=this){let n=new xe;for(let s=this.head;s!==null;s=s.next)t.call(i,s.data,s,this)&&n.appendData(s.data);return n}nextUntil(t,i,n=this){if(t===null)return;let s=this.allocateCursor(null,t);for(;s.next!==null;){let r=s.next;if(s.next=r.next,i.call(n,r.data,r,this))break}this.releaseCursor()}prevUntil(t,i,n=this){if(t===null)return;let s=this.allocateCursor(t,null);for(;s.prev!==null;){let r=s.prev;if(s.prev=r.prev,i.call(n,r.data,r,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new xe;for(let i of this)t.appendData(i);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head===null?this.tail=t:(this.head.prev=t,t.next=this.head),this.head=t,this}prependData(t){return this.prepend(xe.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(xe.createItem(t))}insert(t,i=null){if(i!==null)if(this.updateCursors(i.prev,t,i,t),i.prev===null){if(this.head!==i)throw Error("before doesn't belong to list");this.head=t,i.prev=t,t.next=i,this.updateCursors(null,t)}else i.prev.next=t,t.prev=i.prev,i.prev=t,t.next=i;else this.updateCursors(this.tail,t,null,t),this.tail===null?this.head=t:(this.tail.next=t,t.prev=this.tail),this.tail=t;return this}insertData(t,i){return this.insert(xe.createItem(t),i)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else{if(this.head!==t)throw Error("item doesn't belong to list");this.head=t.next}if(t.next!==null)t.next.prev=t.prev;else{if(this.tail!==t)throw Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(t){this.insert(xe.createItem(t))}pop(){return this.tail===null?null:this.remove(this.tail)}unshift(t){this.prepend(xe.createItem(t))}shift(){return this.head===null?null:this.remove(this.head)}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,i){return t.head===null?this:(i==null?(this.updateCursors(this.tail,t.tail,null,t.head),this.tail===null?this.head=t.head:(this.tail.next=t.head,t.head.prev=this.tail),this.tail=t.tail):(this.updateCursors(i.prev,t.tail,i,t.head),i.prev===null?this.head=t.head:(i.prev.next=t.head,t.head.prev=i.prev),i.prev=t.tail,t.tail.next=i),t.head=null,t.tail
29=null,this)}replace(t,i){"head"in i?this.insertList(i,t):this.insert(i,t),this.remove(t)}};Am=0;Kr=Array(128);for(let e=0;e<Kr.length;e++)Kr[e]=kt(e)&&130||Se(e)&&131||Un(e)&&132||Pm(e)&&133||e||128;Qr="EOF-token.ident-token.function-token.at-keyword-token.hash-token.string-token.bad-string-token.url-token.bad-url-token.delim-token.number-token.percentage-token.dimension-token.whitespace-token.CDO-token.CDC-token.colon-token.semicolon-token.comma-token.[-token.]-token.(-token.)-token.{-token.}-token.comment-token".split("."),xm=16384;ec=10,_m=12,tc=13;Mm=class{constructor(e,t,i,n){this.setSource(e,t,i,n),this.lines=null,this.columns=null}setSource(e="",t=0,i=1,n=1){this.source=e,this.startOffset=t,this.startLine=i,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||ic(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,i){return this.computed||ic(this),{source:i,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Pe=16777215,Re=24,yi=1,xn=2,tt=new Uint8Array(32);tt[2]=22,tt[21]=22,tt[19]=20,tt[23]=24;_e=new Uint8Array(32);_e[2]=yi,_e[21]=yi,_e[19]=yi,_e[23]=yi,_e[22]=xn,_e[20]=xn,_e[24]=xn;Nm=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let i=e.length,n=qn(this.offsetAndType,e.length+1),s=qn(this.balance,e.length+1),r=0,a=-1,l=0,u=e.length;this.offsetAndType=null,this.balance=null,s.fill(0),t(e,(o,c,d)=>{let h=r++;if(n[h]=o<<Re|d,a===-1&&(a=c),s[h]=u,o===l){let f=s[u];s[u]=h,u=f,l=tt[n[f]>>Re]}else this.isBlockOpenerTokenType(o)&&(u=h,l=tt[o])}),n[r]=0<<Re|i,s[r]=r;for(let o=0;o<r;o++){let c=s[o];if(c<=o){let d=s[c];d!==o&&(s[o]=d)}else c>r&&(s[o]=r)}this.source=e,this.firstCharOffset=a===-1?0:a,this.tokenCount=r,this.offsetAndType=n,this.balance=s,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>Re:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let i=this.offsetAndType[t]>>Re;if(i!==13&&i!==25&&e--===0)return i}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Pe:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let i=this.offsetAndType[t]>>Re;if(i!==13&&i!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount&&Fn(this.source,this.offsetAndType[e-1]&Pe,this.offsetAndType[e]&Pe,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Pe:this.offsetAndType[this.tokenCount]&Pe:this.firstCharOffset}getTokenEnd(e){return e===this.tokenIndex?this.tokenEnd:this.offsetAndType[nc(e,0,this.tokenCount)]&Pe}getTokenType(e){return e===this.tokenIndex?this.tokenType:this.offsetAndType[nc(e,0,this.tokenCount)]>>Re}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBlockOpenerTokenType(e){return _e[e]===yi}isBlockCloserTokenType(e){return _e[e]===xn}getBlockTokenPairIndex(e){let t=this.getTokenType(e);if(_e[t]===1){let i=this.balance[e],n=this.getTokenType(i);return tt[t]===n?i:-1}if(_e[t]===2){let i=this.balance[e];return tt[this.getTokenType(i)]===t?i:-1}return-1}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Pe,t=this.offsetAndType[t],this.tokenType=t>>Re,this.tokenEnd=t&Pe):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Re,this.tokenEnd=e&Pe):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let i=e,n=0,s=0;e:for(;i<this.tokenCount;i++){if(n=this.balance[i],n<e)break e;switch(s=i>0?this.offsetAndType[i-1]&Pe:this.firstCharOffset,t(this.source.charCodeAt(s))){case 1:break e;case 2:i++;break e;default:this.isBlockOpenerTokenType(this.offsetAndType[i]>>Re)&&(i=n)}}this.skip(i-this.tokenIndex)}forEachToken(e){for(let t=0,i=this.firstCharOffset;t<this.tokenCount;t++){let n=i,s=this.offsetAndType[t],r=s&Pe,a=s>>Re;i=r,e(a,n,r,t)}}dump(){let e=Array(this.tokenCount);return this.forEachToken((t,i,n,s)=>{e[s]={idx:s,type:Qr[t],chunk:this.source.substring(i,n),balance:this.balance[s]}}),e}};sc=45;Zr=92,vu=34,Eu=39;Hm=32,Jr=92,Vm=34,Um=39,Bm=40,Su=41;({hasOwnProperty:Ia}=Object.prototype),vi=function(){};jm=x({generate:()=>ku,name:()=>Ym,parse:()=>Tu,structure:()=>Km}),He=43,we=45,_n=110,vt=!0,Gm=!1;Ym="AnPlusB",Km={a:[String,null],b:[String,null]};Xm=x({generate:()=>Cu,name:()=>Zm,parse:()=>Au,structure:()=>e0,walkContext:()=>Jm});Zm="Atrule",Jm="atrule",e0={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};t0=x({generate:()=>Lu,name:()=>i0,parse:()=>Iu,structure:()=>s0,walkContext:()=>n0}),i0="AtrulePrelude",n0="atrulePrelude",s0={children:[[]]};r0=x({generate:()=>xu,name:()=>d0,parse:()=>Ru,structure:()=>h0}),a0=36,Pu=42,Nn=61,o0=94,ea=124,l0=126;d0="AttributeSelector",h0={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};p0=x({generate:()=>
29Nu,name:()=>m0,parse:()=>Mu,structure:()=>y0,walkContext:()=>b0}),f0=38;m0="Block",b0="block",y0={children:[["Atrule","Rule","Declaration"]]};v0=x({generate:()=>Du,name:()=>E0,parse:()=>Ou,structure:()=>w0}),E0="Brackets",w0={children:[[]]};S0=x({generate:()=>Vu,name:()=>"CDC",parse:()=>Hu,structure:()=>T0}),T0=[];k0=x({generate:()=>Bu,name:()=>"CDO",parse:()=>Uu,structure:()=>A0}),A0=[];C0=x({generate:()=>qu,name:()=>L0,parse:()=>Fu,structure:()=>P0}),I0=46,L0="ClassSelector",P0={name:String};R0=x({generate:()=>$u,name:()=>N0,parse:()=>Wu,structure:()=>O0}),x0=43,hc=47,_0=62,M0=126,N0="Combinator",O0={name:String};D0=x({generate:()=>ju,name:()=>U0,parse:()=>zu,structure:()=>B0}),H0=42,V0=47,U0="Comment",B0={value:String};F0=x({generate:()=>Yu,name:()=>W0,parse:()=>Gu,structure:()=>$0}),q0=new Set([16,22,0]),W0="Condition",$0={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};z0={media:pc,container:pc,supports(){return this.SupportsDeclaration()}};j0=x({generate:()=>Qu,name:()=>tb,parse:()=>Xu,structure:()=>nb,walkContext:()=>ib}),Ku=33,G0=35,Y0=36,K0=38,X0=42,Q0=43,fc=47;tb="Declaration",ib="declaration",nb={important:[Boolean,String],property:String,value:["Value","Raw"]};ab=x({generate:()=>Ju,name:()=>lb,parse:()=>Zu,structure:()=>cb}),ob=38;lb="DeclarationList",cb={children:[["Declaration","Atrule","Rule"]]};ub=x({generate:()=>td,name:()=>db,parse:()=>ed,structure:()=>hb}),db="Dimension",hb={value:String,unit:String};pb=x({generate:()=>nd,name:()=>gb,parse:()=>id,structure:()=>mb}),fb=47,gb="Feature",mb={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};bb=x({generate:()=>rd,name:()=>yb,parse:()=>sd,structure:()=>vb}),yb="FeatureFunction",vb={kind:String,feature:String,value:["Declaration","Selector"]};wb=x({generate:()=>od,name:()=>kb,parse:()=>ad,structure:()=>Ab}),gc=47,Sb=60,mc=61,Tb=62,kb="FeatureRange",Ab={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};Cb=x({generate:()=>cd,name:()=>Ib,parse:()=>ld,structure:()=>Pb,walkContext:()=>Lb}),Ib="Function",Lb="function",Pb={name:String,children:[[]]};Rb=x({generate:()=>dd,name:()=>xb,parse:()=>ud,structure:()=>_b}),xb="GeneralEnclosed",_b={kind:String,function:[String,null],children:[[]]};Mb=x({generate:()=>pd,name:()=>Nb,parse:()=>hd,structure:()=>Ob,xxx:()=>"XXX"}),Nb="Hash",Ob={value:String};Db=x({generate:()=>gd,name:()=>Hb,parse:()=>fd,structure:()=>Vb}),Hb="Identifier",Vb={name:String};Ub=x({generate:()=>bd,name:()=>Bb,parse:()=>md,structure:()=>Fb}),Bb="IdSelector",Fb={name:String};qb=x({generate:()=>vd,name:()=>$b,parse:()=>yd,structure:()=>zb}),Wb=46,$b="Layer",zb={name:String};jb=x({generate:()=>wd,name:()=>Gb,parse:()=>Ed,structure:()=>Yb}),Gb="LayerList",Yb={children:[["Layer"]]};Kb=x({generate:()=>Td,name:()=>Xb,parse:()=>Sd,structure:()=>Qb}),Xb="MediaQuery",Qb={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};Zb=x({generate:()=>Ad,name:()=>Jb,parse:()=>kd,structure:()=>ey}),Jb="MediaQueryList",ey={children:[["MediaQuery"]]};ty=x({generate:()=>Id,name:()=>ny,parse:()=>Cd,structure:()=>sy}),iy=38,ny="NestingSelector",sy={};ry=x({generate:()=>Pd,name:()=>"Nth",parse:()=>Ld,structure:()=>ay}),ay={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};oy=x({generate:()=>xd,name:()=>ly,parse:()=>Rd,structure:()=>cy}),ly="Number",cy={value:String};uy=x({generate:()=>Md,name:()=>dy,parse:()=>_d,structure:()=>hy}),dy="Operator",hy={value:String};py=x({generate:()=>Od,name:()=>fy,parse:()=>Nd,structure:()=>gy}),fy="Parentheses",gy={children:[[]]};my=x({generate:()=>Hd,name:()=>by,parse:()=>Dd,structure:()=>yy}),by="Percentage",yy={value:String};vy=x({generate:()=>Ud,name:()=>Ey,parse:()=>Vd,structure:()=>Sy,walkContext:()=>wy}),Ey="PseudoClassSelector",wy="function",Sy={name:String,children:[["Raw"],null]};Ty=x({generate:()=>Fd,name:()=>ky,parse:()=>Bd,structure:()=>Cy,walkContext:()=>Ay}),ky="PseudoElementSelector",Ay="function",Cy={name:String,children:[["Raw"],null]};Iy=x({generate:()=>Wd,name:()=>Ly,parse:()=>qd,structure:()=>Py}),yc=47;Ly="Ratio",Py={left:["Number","Function"],right:["Number","Function",null]};Ry=x({generate:()=>zd,name:()=>"Raw",parse:()=>$d,structure:()=>_y});_y={value:String};My=x({generate:()=>Gd,name:()=>Oy,parse:()=>jd,structure:()=>Hy,walkContext:()=>Dy});Oy="Rule",Dy="rule",Hy={prelude:["SelectorList","Raw"],block:["Block"]};Vy=x({generate:()=>Kd,name:()=>Uy,parse:()=>Yd,structure:()=>By}),Uy="Scope",By={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};Fy=x({generate:()=>Qd,name:()=>qy,parse:()=>Xd,structure:()=>Wy}),qy="Selector",Wy={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Comb
29inator"]]};$y=x({generate:()=>Jd,name:()=>zy,parse:()=>Zd,structure:()=>Gy,walkContext:()=>jy}),zy="SelectorList",jy="selector",Gy={children:[["Selector","Raw"]]};Yy=x({generate:()=>th,name:()=>Ky,parse:()=>eh,structure:()=>Xy}),Ky="String",Xy={value:String};Qy=x({generate:()=>nh,name:()=>Jy,parse:()=>ih,structure:()=>tv,walkContext:()=>ev}),Zy=33;Jy="StyleSheet",ev="stylesheet",tv={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};iv=x({generate:()=>rh,name:()=>nv,parse:()=>sh,structure:()=>sv}),nv="SupportsDeclaration",sv={declaration:"Declaration"};rv=x({generate:()=>oh,name:()=>ov,parse:()=>ah,structure:()=>lv}),av=42,Sc=124;ov="TypeSelector",lv={name:String};cv=x({generate:()=>dh,name:()=>hv,parse:()=>uh,structure:()=>pv}),lh=43,ch=45,ta=63;hv="UnicodeRange",pv={value:String};fv=x({generate:()=>ph,name:()=>"Url",parse:()=>hh,structure:()=>gv}),gv={value:String};mv=x({generate:()=>gh,name:()=>bv,parse:()=>fh,structure:()=>yv}),bv="Value",yv={children:[[]]};vv=x({generate:()=>bh,name:()=>wv,parse:()=>mh,structure:()=>Sv}),Ev=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),wv="WhiteSpace",Sv={value:String};it=zm({node:x({AnPlusB:()=>jm,Atrule:()=>Xm,AtrulePrelude:()=>t0,AttributeSelector:()=>r0,Block:()=>p0,Brackets:()=>v0,CDC:()=>S0,CDO:()=>k0,ClassSelector:()=>C0,Combinator:()=>R0,Comment:()=>D0,Condition:()=>F0,Declaration:()=>j0,DeclarationList:()=>ab,Dimension:()=>ub,Feature:()=>pb,FeatureFunction:()=>bb,FeatureRange:()=>wb,Function:()=>Cb,GeneralEnclosed:()=>Rb,Hash:()=>Mb,IdSelector:()=>Ub,Identifier:()=>Db,Layer:()=>qb,LayerList:()=>jb,MediaQuery:()=>Kb,MediaQueryList:()=>Zb,NestingSelector:()=>ty,Nth:()=>ry,Number:()=>oy,Operator:()=>uy,Parentheses:()=>py,Percentage:()=>my,PseudoClassSelector:()=>vy,PseudoElementSelector:()=>Ty,Ratio:()=>Iy,Raw:()=>Ry,Rule:()=>My,Scope:()=>Vy,Selector:()=>Fy,SelectorList:()=>$y,String:()=>Yy,StyleSheet:()=>Qy,SupportsDeclaration:()=>iv,TypeSelector:()=>rv,UnicodeRange:()=>cv,Url:()=>fv,Value:()=>mv,WhiteSpace:()=>vv})}),La=["left","right","top","bottom","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","inset-block","inset-inline","inset"];Xn=["margin-block-start","margin-block-end","margin-block","margin-inline-start","margin-inline-end","margin-inline","margin-bottom","margin-left","margin-right","margin-top","margin"];Qn=["width","height","min-width","min-height","max-width","max-height","block-size","inline-size","min-block-size","min-inline-size","max-block-size","max-inline-size"];vh=["padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end"],Pa=["justify-self","align-self","place-self"];Eh=[...La,...Xn,...Qn,...Pa,"position-anchor","position-area"],Av=[...Qn,...La,...Xn];Cv=["top","left","right","bottom","start","end","self-start","self-end","center","inside","outside"];Iv=["width","height","block","inline","self-block","self-inline"];Tc=new Set(["Atrule","Selector","Declaration"]);kc=x({safe:()=>Ah,spec:()=>Mv}),Rv=43,xv=45,Hr=(e,t)=>(e===9&&(e=t),typeof e=="string"&&(e=Math.min(e.charCodeAt(0),128)<<6),e<<1),Th=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],_v=Th.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);Mv=kh(Th),Ah=kh(_v),Nv=92;Hv=Dv({node:x({AnPlusB:()=>ku,Atrule:()=>Cu,AtrulePrelude:()=>Lu,AttributeSelector:()=>xu,Block:()=>Nu,Brackets:()=>Du,CDC:()=>Vu,CDO:()=>Bu,ClassSelector:()=>qu,Combinator:()=>$u,Comment:()=>ju,Condition:()=>Yu,Declaration:()=>Qu,DeclarationList:()=>Ju,Dimension:()=>td,Feature:()=>nd,FeatureFunction:()=>rd,FeatureRange:()=>od,Function:()=>cd,GeneralEnclosed:()=>dd,Hash:()=>pd,IdSelector:()=>bd,Identifier:()=>gd,Layer:()=>vd,LayerList:()=>wd,MediaQuery:()=>Td,MediaQueryList:()=>Ad,NestingSelector:()=>Id,Nth:()=>Pd,Number:()=>xd,Operator:()=>Md,Parentheses:()=>Od,Percentage:()=>Hd,PseudoClassSelector:()=>Ud,PseudoElementSelector:()=>Fd,Ratio:()=>Wd,Raw:()=>zd,Rule:()=>Gd,Scope:()=>Kd,Selector:()=>Qd,SelectorList:()=>Jd,String:()=>th,StyleSheet:()=>nh,SupportsDeclaration:()=>rh,TypeSelector:()=>oh,UnicodeRange:()=>dh,Url:()=>ph,Value:()=>gh,WhiteSpace:()=>bh})});Ac=100,Uv=60,Bv="    ";$t=()=>{}
29,qv=33,Wv=35,Vr=59,Lc=123,Pc=0,$v={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},zv={createList(){return new Pi},createSingleNodeList(e){return new Pi().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};Kv=35,Xv=42,Rc=43,Qv=45,Zv=47,Jv=117;eE={getNode:Ch},tE=35,iE=38,nE=42,sE=43,rE=47,xc=46,aE=62,oE=124,lE=126;dE={onWhiteSpace:cE,getNode:uE};fE={getNode:Ch,onWhiteSpace(e,t){_c(e)&&(e.value=" "+e.value),_c(t.last)&&(t.last.value+=" ")},expression:hE,var:pE},gE=x({AtrulePrelude:()=>eE,Selector:()=>dE,Value:()=>fE}),mE=new Set(["none","and","not","or"]),bE={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);mE.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition("container")),e},block(e=!1){return this.Block(e)}}},yE={parse:{prelude:null,block(){return this.Block(!0)}}};Mc={layer(){this.skipSC();
29let e=this.createList(),t=Br.call(this,this.Layer);return(t.type!=="Raw"||t.value!=="")&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=Br.call(this,this.Declaration,()=>Br.call(this,()=>this.Condition("supports")));return(t.type!=="Raw"||t.value!=="")&&e.push(t),e}},vE={container:bE,"font-face":yE,import:{parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&e.push(this.Function(null,Mc)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&e.push(this.Function(null,Mc)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(e=!1){return this.Block(e)}}}};yt={parse(){return this.createSingleNodeList(this.SelectorList())}},Fr={parse(){return this.createSingleNodeList(this.Selector())}},wE={parse(){return this.createSingleNodeList(this.Identifier())}},SE={parse:EE},Pn={parse(){return this.createSingleNodeList(this.Nth())}},TE=Yv({parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(e){return this.Condition(e.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:gE,atrule:vE,pseudo:{dir:wE,has:yt,lang:SE,matches:yt,is:yt,"-moz-any":yt,"-webkit-any":yt,where:yt,not:yt,"nth-child":Pn,"nth-last-child":Pn,"nth-last-of-type":Pn,"nth-of-type":Pn,slotted:Fr,host:Fr,"host-context":Fr},node:x({AnPlusB:()=>Tu,Atrule:()=>Au,AtrulePrelude:()=>Iu,AttributeSelector:()=>Ru,Block:()=>Mu,Brackets:()=>Ou,CDC:()=>Hu,CDO:()=>Uu,ClassSelector:()=>Fu,Combinator:()=>Wu,Comment:()=>zu,Condition:()=>Gu,Declaration:()=>Xu,DeclarationList:()=>Zu,Dimension:()=>ed,Feature:()=>id,FeatureFunction:()=>sd,FeatureRange:()=>ad,Function:()=>ld,GeneralEnclosed:()=>ud,Hash:()=>hd,IdSelector:()=>md,Identifier:()=>fd,Layer:()=>yd,LayerList:()=>Ed,MediaQuery:()=>Sd,MediaQueryList:()=>kd,NestingSelector:()=>Cd,Nth:()=>Ld,Number:()=>Rd,Operator:()=>_d,Parentheses:()=>Nd,Percentage:()=>Dd,PseudoClassSelector:()=>Vd,PseudoElementSelector:()=>Bd,Ratio:()=>qd,Raw:()=>$d,Rule:()=>jd,Scope:()=>Yd,Selector:()=>Xd,SelectorList:()=>Zd,String:()=>eh,StyleSheet:()=>ih,SupportsDeclaration:()=>sh,TypeSelector:()=>ah,UnicodeRange:()=>uh,Url:()=>hh,Value:()=>fh,WhiteSpace:()=>mh})}),Ih="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ne=(e=21)=>{let t="",i=e|0;for(;i-- >0;)t+=Ih[Math.random()*64|0];return t},Lh={All:"all",None:"none"};Zn=(function(){var e=te(function*(t){var i,n;let s=yield(i=Me.getOffsetParent)==null?void 0:i.call(Me,t);if(!(yield(n=Me.isElement)==null?void 0:n.call(Me,s))){var r;s=(yield(r=Me.getDocumentElement)==null?void 0:r.call(Me,t))||window.document.documentElement}return s});return function(t){return e.apply(this,arguments)}})();Si=(e,t)=>e.flatMap(i=>{let n=[...i.querySelectorAll(t)];if(i instanceof ShadowRoot){let s=i.host;RE(s,t)&&n.push(s)}return n}),Jt=Ne(),Ti=new Set;$n=(Nc=(Oc=globalThis.CSSStyleSheet)==null?void 0:Oc.prototype.replaceSync)==null?(()=>{}):Nc,Rh=new WeakMap;Dc=new WeakSet;`${Jt}`;At=["top","left","right","bottom"],NE=[...At,"justify-self","align-self"],st=ne
29w Map(NE.map(e=>[e,`--pa-value-${e}-${Jt}`])),xa=new Map(At.map(e=>[e,`--pa-wrapper-${e}-${Jt}`])),OE=[...st.values(),...xa.values()];na=e=>ce(e,"position")==="fixed"?"fixed":"absolute",xi=[...Eh,...vh,"anchor-scope","anchor-name"].reduce((e,t)=>(e[t]=`--${t}-${Jt}`,e),{}),_a="data-generated-by-polyfill",Hc=!1;Vc="InvalidMimeType";xh=(e=21)=>{let t="",i=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Ih[i[e]&63];return t},_h=`--pa-cascade-property-${Jt}`,aa="data-anchor-position-wrapper",Mh="data-anchor-position-area",oa="data-pa-wrapper-for-",Nh="data-pa-target-for-",Uc="POLYFILL-POSITION-AREA";P={Logical:"Logical",LogicalSelf:"LogicalSelf",Physical:"Physical",PhysicalSelf:"PhysicalSelf",Irrelevant:"Irrelevant"},QE="left.center.right.span-left.span-right.x-start.x-end.span-x-start.span-x-end.self-x-start.self-x-end.span-self-x-start.span-self-x-end.span-all.top.bottom.span-top.span-bottom.y-start.y-end.span-y-start.span-y-end.self-y-start.self-y-end.span-self-y-start.span-self-y-end.block-start.block-end.span-block-start.span-block-end.inline-start.inline-end.span-inline-start.span-inline-end.self-block-start.self-block-end.span-self-block-start.span-self-block-end.self-inline-start.self-inline-end.span-self-inline-start.span-self-inline-end.start.end.span-start.span-end.self-start.self-end.span-self-start.span-self-end".split(".");Bc={left:[0,1,P.Irrelevant],center:[1,2,P.Irrelevant],right:[2,3,P.Irrelevant],"span-left":[0,2,P.Irrelevant],"span-right":[1,3,P.Irrelevant],"x-start":[0,1,P.Physical],"x-end":[2,3,P.Physical],"span-x-start":[0,2,P.Physical],"span-x-end":[1,3,P.Physical],"self-x-start":[0,1,P.PhysicalSelf],"self-x-end":[2,3,P.PhysicalSelf],"span-self-x-start":[0,2,P.PhysicalSelf],"span-self-x-end":[1,3,P.PhysicalSelf],"span-all":[0,3,P.Irrelevant],top:[0,1,P.Irrelevant],bottom:[2,3,P.Irrelevant],"span-top":[0,2,P.Irrelevant],"span-bottom":[1,3,P.Irrelevant],"y-start":[0,1,P.Physical],"y-end":[2,3,P.Physical],"span-y-start":[0,2,P.Physical],"span-y-end":[1,3,P.Physical],"self-y-start":[0,1,P.PhysicalSelf],"self-y-end":[2,3,P.PhysicalSelf],"span-self-y-start":[0,2,P.PhysicalSelf],"span-self-y-end":[1,3,P.PhysicalSelf],"block-start":[0,1,P.Logical],"block-end":[2,3,P.Logical],"span-block-start":[0,2,P.Logical],"span-block-end":[1,3,P.Logical],"inline-start":[0,1,P.Logical],"inline-end":[2,3,P.Logical],"span-inline-start":[0,2,P.Logical],"span-inline-end":[1,3,P.Logical],"self-block-start":[0,1,P.LogicalSelf],"self-block-end":[2,3,P.LogicalSelf],"span-self-block-start":[0,2,P.LogicalSelf],"span-self-block-end":[1,3,P.LogicalSelf],"self-inline-start":[0,1,P.LogicalSelf],"self-inline-end":[2,3,P.LogicalSelf],"span-self-inline-start":[0,2,P.LogicalSelf],"span-self-inline-end":[1,3,P.LogicalSelf],start:[0,1,P.Logical],end:[2,3,P.Logical],"span-start":[0,2,P.Logical],"span-end":[1,3,P.Logical],"self-start":[0,1,P.LogicalSelf],"self-end":[2,3,P.LogicalSelf],"span-self-start":[0,2,P.LogicalSelf],"span-self-end":[1,3,P.LogicalSelf]},ZE=["left","center","right","span-left","span-right","x-start","x-end","span-x-start","span-x-end","self-x-start","self-x-end","span-self-x-start","span-self-x-end","span-all"],JE=["top","center","bottom","span-top","span-bottom","y-start","y-end","span-y-start","span-y-end","self-y-start","self-y-end","span-self-y-start","span-self-y-end","span-all"],ew=["block-start","center","block-end","span-block-start","span-block-end","span-all"],tw=["inline-start","center","inline-end","span-inline-start","span-inline-end","span-all"],iw=["self-block-start","center","self-block-end","span-self-block-start","span-self-block-end","span-all"],nw=["self-inline-start","center","self-inline-end","span-self-inline-start","span-self-inline-end","span-all"],Fc=["start","center","end","span-start","span-end","span-all"],qc=["self-start","center","self-end","span-self-start","span-self-end","span-all"],sw=["block","top","bottom","y"],rw=["inline","left","right","x"];ow=[[ZE,JE],[ew,tw],[iw,nw],[Fc,Fc],[qc,qc]];Wc=e=>{let t=getComputedStyle(e);return{writingMode:t.writingMode,direction:t.direction}},cw=(function(){var e=te(function*(t,i){let n=yield Zn(t);switch(i){case P.Logical:case P.Physical:return Wc(n);
29case P.LogicalSelf:case P.PhysicalSelf:return Wc(t);default:return null}});return function(t,i){return e.apply(this,arguments)}})(),Wr=e=>e.reverse().map(t=>3-t),Dh=(e,t)=>e===P.Irrelevant?t:e,uw=(function(){var e=te(function*({block:t,inline:i},n){let s=yield cw(n,Dh(t[2],i[2])),r={block:[t[0],t[1]],inline:[i[0],i[1]]};if(s){if(s.direction==="rtl"&&(r.inline=Wr(r.inline)),s.writingMode.startsWith("vertical")){let a=r.block;r.block=r.inline,r.inline=a}if(s.writingMode.startsWith("sideways")){let a=r.block;r.block=r.inline,r.inline=a,s.writingMode.endsWith("lr")&&(r.block=Wr(r.block))}s.writingMode.endsWith("rl")&&(r.inline=Wr(r.inline))}return r});return function(t,i){return e.apply(this,arguments)}})(),dw=({block:e,inline:t})=>{let i=[0,"top","bottom",0],n=[0,"left","right",0];return{block:[i[e[0]],i[e[1]]],inline:[n[t[0]],n[t[1]]]}};ww=["normal","most-width","most-height","most-block-size","most-inline-size"],Sw=["flip-block","flip-inline","flip-start"];Mw={"flip-block":{top:"bottom",bottom:"top","inset-block-start":"inset-block-end","inset-block-end":"inset-block-start","margin-top":"margin-bottom","margin-bottom":"margin-top"},"flip-inline":{left:"right",right:"left","inset-inline-start":"inset-inline-end","inset-inline-end":"inset-inline-start","margin-left":"margin-right","margin-right":"margin-left"},"flip-start":{left:"top",right:"bottom",top:"left",bottom:"right","inset-block-start":"inset-block-end","inset-block-end":"inset-block-start","inset-inline-start":"inset-inline-end","inset-inline-end":"inset-inline-start","inset-block":"inset-inline","inset-inline":"inset-block"}},Nw={"flip-block":{top:"bottom",bottom:"top",start:"end",end:"start","self-end":"self-start","self-start":"self-end"},"flip-inline":{left:"right",right:"left",start:"end",end:"start","self-end":"self-start","self-start":"self-end"},"flip-start":{top:"left",left:"top",right:"bottom",bottom:"right"}},Ow={"flip-block":{top:"bottom",bottom:"top",start:"end",end:"start"},"flip-inline":{left:"right",right:"left",start:"end",end:"start"},"flip-start":{}};Bw=(e,t)=>{var i;return((i=nt(`#id{${e}: ${t};}`).children.first)==null?void 0:i.block.children.first).value};Dn={},wi={},wt={},Ai={},Et={};aS=["as","blocking","crossorigin","disabled","fetchpriority","href","hreflang","integrity","referrerpolicy","rel","type"];lS=(e,t)=>{let i;switch(e){case"start":case"self-start":i=0;break;case"end":case"self-end":i=100;break;default:typeof e=="number"&&!Number.isNaN(e)&&(i=e)}if(i!==void 0)return t?100-i:i},cS=(e,t)=>{let i;switch(e){case"block":case"self-block":i=t?"width":"height";break;case"inline":case"self-inline":i=t?"height":"width"}return i},Qc=e=>{switch(e){case"top":case"bottom":case"inset-block-start":case"inset-block-end":return"y";case"left":case"right":case"inset-inline-start":case"inset-inline-end":return"x"}return null},uS=e=>{switch(e){case"x":return"width";
29case"y":return"height"}return null},Zc=e=>ce(e,"display")==="inline",Jc=(e,t)=>(t==="x"?["border-left-width","border-right-width"]:["border-top-width","border-bottom-width"]).reduce((i,n)=>i+parseFloat(ce(e,n)),0)||0,Rn=(e,t)=>parseFloat(getComputedStyle(e).getPropertyValue(`border-${t}-width`))||0,Bh=e=>{let t=getComputedStyle(e),i=n=>parseFloat(t.getPropertyValue(`margin-${n}`))||0;return{top:i("top"),right:i("right"),bottom:i("bottom"),left:i("left")}},zr=(function(){var e=te(function*({targetEl:t,targetProperty:i,anchorRect:n,anchorSide:s,anchorSize:r,fallback:a=null}){if(!((r||s!==void 0)&&t&&n))return a;if(r){if(!wh(i))return a;let u;switch(r){case"width":case"height":u=r;break;default:{let o=ce(t,"writing-mode");u=cS(r,o.startsWith("vertical-")||o.startsWith("sideways-"))}}return u?`${n[u]}px`:a}if(s!==void 0){let u,o,c=Qc(i);if(!(Ri(i)&&c&&(!Ri(s)||c===Qc(s))))return a;let d=["top","left","inset-block-start","inset-inline-start"],h=["bottom","right","inset-block-end","inset-inline-end"];switch(s){case"left":case"top":u=0;break;case"right":case"bottom":u=100;break;case"center":u=50;break;case"inside":u=d.includes(i)?0:100;break;case"outside":u=d.includes(i)?100:0;break;default:if(t){var l;u=lS(s,(yield(l=Me.isRTL)==null?void 0:l.call(Me,t))||!1)}}let f=typeof u=="number"&&!Number.isNaN(u),g=uS(c);if(f&&g){h.includes(i)&&(o=yield Zn(t));let p=n[c]+n[g]*(u/100);switch(i){case"bottom":case"inset-block-end":{if(!o)break;let y=o.clientHeight;if(y===0&&Zc(o)){let m=Jc(o,c);y=o.offsetHeight-m}p=y-p;break}case"right":case"inset-inline-end":{if(!o)break;let y=o.clientWidth;if(y===0&&Zc(o)){let m=Jc(o,c);y=o.offsetWidth-m}p=y-p;break}}return`${p}px`}}return a});return function(t){return e.apply(this,arguments)}})(),dS=e=>"targetUUID"in e,hS=e=>"uuid"in e,eu=(e,t,i,n,s)=>{switch(e){case"start":return[t??"0px","auto"];case"end":return["auto",i??"0px"];case"center":{let r=parseFloat(t??"0"),a=parseFloat(i??"0");return[`${r+(n-r-a-s)/2}px`,"auto"]}}};iu=new WeakSet,nu=!1;Sa=new WeakMap,su=!1;ES=Fh});var is="bookmarkbutton:toggle",Za="breaking_news:gtm",ri="drawer:closed",Ja="drawer:closing",eo="drawer:opened",to="drawer:opening",io="fetch:fetched",ke="gallery:change",qe="gallery:open_paywall_dialog";var ai="messagehandler:adreload",no="messagehandler:interaction";var so="quiz:answer_given",ro="quiz:finished",ao="quiz:restarted",oo="quiz:started",lo="quiz:viewed",oi="shortextgallery:change",ns="soft_primer:clicked",Ni="soft_primer:permission",co="soft_primer:shown";var uo="texttospeech:closed",ss="texttospeech:opened",ho="tooltip:closed",po="tooltip:shown";var ve="zephr.browserDecisionsFinished",rs="zephr_decision:paid",Ae="zephr:disabled";var he="zephr:timeout";var as=class{#e=new Map;#t=[];subscribe(t,i){if(typeof i!="function")throw new TypeError(`MessageHub.subscribe("${t}"): callback must be a function.`);this.#e.has(t)||this.#e.set(t,new Set),this.#e.get(t).add(i)}unsubscribe(t,i){this.#e.get(t)?.delete(i)}publish(t,i,n){i||console.warn(`MessageHub.publish("${t}") called without a source. Provide a non-empty publisher identifier as the second argument.`),this.#t.push(Object.freeze({eventName:t,source:i,details:n,timestamp:new Date})),this.#e.get(t)?.forEach(s=>{try{s(n)}catch(r){console.error(`MessageHub subscriber to "${t}" threw:`,r)}})}inspect(){return[...this.#t]}},fo=Symbol.for("@website/web-components/message-hub"),go=globalThis,S=go[fo]??(go[fo]=new as);function os(e,t=0,{leading:i=!0,trailing:n=!0}={}){let s=0,r,a,l=()=>performance.now(),u=()=>{s=l()+t},o=()=>{clearTimeout(a),a=void 0,r=void 0,s=0},c=()=>{if(r){let h=r;o(),u(),e(...h)}};return Object.assign((...h)=>{r=h;let f=Math.max(0,s-l());!f&&(i||a)?c():n&&(f||u(),clearTimeout(a),a=setTimeout(c,f||t))},{cancel:o,flush:c})}function Ke(){let e={xs:0,md:768,lg:1024,xl:1440};function t(){return window.screen&&window.screen.orientation?window.screen.orientation.type.includes("landscape")?"landscape":"portrait":window.innerWidth>window.innerHeight?"landscape":"portrait"}function i(){let s=Math.max(document.documentElement.clientHeight,window.innerHeight||0),r=Math.max(document.documentElement.clientWidth,window.innerWidth||0);return s<e.lg&&r<e.lg}let n=i()&&t()==="landscape"?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0);return n<=e.md?"mobile":n<=e.lg?"tablet":n<=e.xl?"desktop":"widescreen"}var Rt=class{#e;#t=null;#n=0;#s=0;constructor(t){this.#e=t}observe(t){this.#t=t,t.addEventListener("wheel",this.#i),t.addEventListener("touchstart",this.#r),t.addEventListener("touchmove",this.#a)}disconnect(){this.#t&&(this.#t.removeEventListener("wheel",this.#i),this.#t.removeEventListener("touchstart",this.#r),this.#t.removeEventListener("touchmove",this.#a),this.#t=null)}#i=t=>{Math.abs(t.deltaX)>Math.abs(t.deltaY)&&(t.preventDefault(),this.#e())};#r=t=>{let i=t.touches[0];this.#n=i.clientX,this.#s=i.clientY};#a=t=>{let i=t.touches[0],n=i.clientX-this.#n,s=i.clientY-this.#s;Math.abs(n)>Math.abs(s)&&(t.preventDefault(),this.#e())}},Ye=class{#e;#t=["click","keydown","mousemove","scroll","touchstart"];#n=[];constructor(t){this.#e=t}#s=()=>{this.#e()};#i(t){for(let i of this.#t)t.removeEventListener(i,this.#s)}observe(t){for(let i of this.#t)t.addEventListener(i,this.#s);this.#n.push(t)}unobserve(t){let i=this.#n.indexOf(t);i!==-1&&(this.#i(t),this.#n.splice(i,1))}disconnect(){for(let t of this.#n)this.#i(t)}};function li(e){return e instanceof Element&&"getViewportElement"in e&&typeof e.getViewportElement=="function"}function mo(e,t){try{let i=JSON.parse(e);return t(i)?i:void 0}catch(i){console.error("Failed to parse JSON ",i);return}}function ct(e){try{let t=window[e],i="__test__";return t.setItem(i,i),t.removeItem(i),!0}catch(t){return console.error(`Storage checking for '${e}' failed `,t),!1}}var _S="ResizeObserver"in window;function Oi(e){let t=new Event("scrollend"),i;e.addEventListener("scroll",()=>{window.clearTimeout(i),i=window.setTimeout(()=>
29e.dispatchEvent(t),100)})}function bo(e,t={},i=""){if(!e)return Promise.reject(new Error('Missing "url" parameter, try something like `loadResource("https://code.jquery.com/jquery-3.3.1.min.js")`.'));let n=/\.(css|js)/.exec(e);if(n===null)return Promise.reject(new Error('Unknown file type, try to load ".css" or ".js" files.'));let r={css:{element:"link",properties:{href:e,rel:"stylesheet"}},js:{element:"script",properties:{async:!0,src:e}}}[n[1]];return r.properties={...r.properties,...t},new Promise((a,l)=>{let u=document.createElement(r.element);for(let o in r.properties)if(Object.prototype.hasOwnProperty.call(r.properties,o)){let c=r.properties[o];o in u?u[o]=c:u.setAttribute(o,c)}i&&u.appendChild(document.createTextNode(i)),u.addEventListener("load",()=>a(u),!1),u.addEventListener("error",()=>l(new Error(`Unable to load element, check "${e}" for errors.`)),!1),document.body.appendChild(u)})}function yo(e){if(!e.startsWith("PT"))throw new Error("Invalid duration format");let t=/PT(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?/,i=e.match(t);if(!i)throw new Error("Invalid duration format");let[n,s,r,a]=i;return parseInt(s||"0")*3600+parseInt(r||"0")*60+parseInt(a||"0")}var ls=class extends HTMLElement{#e=!1;get contentType(){return this.getAttribute("content-type")??""}get isIndexPage(){return this.getAttribute("is-index-page")==="true"}get keywords(){return JSON.parse(this.getAttribute("keywords")??"[]")}get name(){return this.getAttribute("name")??""}get zone(){return this.getAttribute("zone")??""}get userType(){return this.getAttribute("user-type")??""}get liveUrl(){return this.getAttribute("live-url")??""}get previewUrl(){return this.getAttribute("preview-url")??""}get pageHasDynamicContent(){return this.hasAttribute("page-has-dynamic-content")}constructor(){super(),this.attachShadow({mode:"open"})}#t(){Array.isArray(window.MoltenBundle?.cmd)&&(window.MoltenBundle.cmd.push(()=>{window.MoltenBundle.finalize()}),S.subscribe(ke,this.#r),S.subscribe(oi,this.#a),S.subscribe(ai,this.#d),this.pageHasDynamicContent&&this.#p())}#n(){switch(this.#f(this.#c()?this.previewUrl:this.liveUrl),this.name){case"bottom":this.#t();break;case"top":this.#i();break;default:console.log(`Unknown adscript name: ${this.name}`);break}}#s=t=>t==="widescreen"?"desktop":t;#i(){window.MoltenBundle=window.MoltenBundle||{},window.MoltenBundle.cmd=window.MoltenBundle.cmd||[],window.MoltenBundle.cmd.push(()=>
29{window.MoltenBundle.getClient().setSiteType(this.#s(Ke())),window.MoltenBundle.getClient().setZone(this.zone),window.MoltenBundle.getClient().setIsIndexPage(this.isIndexPage),window.MoltenBundle.getClient().setKeywords(this.keywords),window.MoltenBundle.getClient().addTargetingParameter("ct",this.contentType),this.userType&&this.userType==="plus"&&window.MoltenBundle.getClient().addTargetingParameter("ut","plus")})}#r=t=>{this.#o({detail:t})};#a=t=>{this.#o({detail:t})};#o(t){let{adTagIds:i,itemNumber:n}=t.detail,s=n!==void 0?parseInt(n):void 0;typeof s=="number"&&s%2===0&&this.#u(i)}#d=t=>{let{adTagIds:i}=t;this.#u(i)};#u(t){window.MoltenBundle.cmd.push(()=>{window.MoltenBundle.getClient().reloadSpecificAds(t)})}#c(){return window.location.search.includes("ada=1")}#f(t){let i=document.createElement("script");i.src=t,i.async=!0,this.shadowRoot.appendChild(i)}#l=()=>{if(this.#e||(this.#e=!0,S.unsubscribe(he,this.#l),S.unsubscribe(Ae,this.#l),!document.querySelector('[data-zephr="stern-paid-barrier"]')))return;document.querySelector(".article__body")?.querySelectorAll("ws-adtag")?.forEach(s=>{s.id!=="outstream_div"&&s.removeAttribute("disabled")})};#p(){S.subscribe(he,this.#l),S.subscribe(Ae,this.#l),document.addEventListener(ve,this.#l)}#h(){document.removeEventListener(ve,this.#l),S.unsubscribe(he,this.#l),S.unsubscribe(Ae,this.#l)}connectedCallback(){this.#n()}disconnectedCallback(){S.unsubscribe(ke,this.#r),S.unsubscribe(oi,this.#a),S.unsubscribe(ai,this.#d),this.pageHasDynamicContent&&this.#h()}};"customElements"in window&&customElements.get("ws-adscript")===void 0&&customElements.define("ws-adscript",ls);var vo=document.createElement("template");vo.innerHTML=`
30    <style>
31      :host {
32        display: block;
33      }
34      :host([hidden]) {
35        display: none;
36      }
37    </style>
38    <slot name="ad-label"></slot>
39    <slot></slot>
40`;var dp=["skyscraper_1","skyscraper_2","superbanner_1","wallpaper_1"],Eo=e=>{if(!e)return!1;let t=window.getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"||t.opacity==="0"||t.blockSize==="0px"||t.maxBlockSize==="0px"?!1:e.parentElement?Eo(e.parentElement):!0},hp=(e,t,i)=>{e||(e=document.createElement("style"),document.head.appendChild(e));let n=e.sheet,s=n.cssRules||n.rules,r=Array.from(s).findIndex(a=>a.selectorText===t);return r!==-1&&n.deleteRule(r),n.insertRule(`${t} { ${i} }`,s.length),e},cs=class extends HTMLElement{static observedAttributes=["disabled"];#e=null;get disabled(){return this.hasAttribute("disabled")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}get media(){return this.getAttribute("media")?.split(",")??[]}get reloading(){return this.getAttribute("reloading")??"none"}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(vo.content.cloneNode(!0))}attributeChangedCallback(t,i,n){t==="disabled"&&i===""&&n===null&&(this.#t(),this.#s())}connectedCallback(){if(this.media.length&&!this.media.includes(Ke())){this.remove();return}!Array.isArray(window.MoltenBundle?.cmd)||this.disabled||(this.loaded?this.reloading==="manual"&&this.#n():(this.#t(),this.#s()))}#t(){window.MoltenBundle.cmd.push(()=>window.MoltenBundle.push(this.id)),this.loaded=!0}#n(){window.MoltenBundle.cmd.push(()=>window.MoltenBundle.getClient().reloadAd(this.id))}#s(){window.MoltenBundle.cmd.push(()=>{window.MoltenBundle.registerAdPositionLoadedHandler(t=>{if(!dp.includes(this.id)&&typeof t.containsAd=="function"&&t.containsAd()&&typeof t.getName=="function"&&t.getName()===this.id){if(!this.querySelector(".ad-labels")){let u=document.createElement("div"),o=`ad-${this.id}`;u.classList.add("ad-labels",o),u.innerHTML="Anzeige",u.setAttribute("slot","ad-label"),this.appendChild(u)}let s=t.ad.container.querySelectorAll("iframe"),r=Array.from(s).find(u=>Eo(u));if(!r)return;let a=r.offsetWidth,l=`ad-${this.id}`;this.#e=hp(this.#e,`.${l}`,`inline-size: ${a}px;`)}})})}};"customElements"in window&&customElements.get("ws-adtag")===void 0&&customElements.define("ws-adtag",cs);var wo=document.createElement("template");wo.innerHTML=`
41  <style>
42    @media (max-width: 767px) {
43      :host {
44        --scroll-padding: 10rem;
45        --range-start: 1.5rem; /* offset breadcrumb height to start progress animation */
46
47        background-color: var(--article-progress-bar-bg-color);
48        block-size: 0.25rem;
49        inset: 0;
50        position: fixed;
51        z-index: 3;
52      }
53
54      :host::before {
55        animation-fill-mode: both;
56        animation-name: scroll-progress;
57        animation-range-end: exit 50vh;
58        animation-range-start: contain
59          calc(var(--range-start) + var(--scroll-padding));
60        animation-timeline: --article-progress-bar;
61        background-color: var(--article-progress-bar-fill-bg-color);
62        block-size: 100%;
63        content: "";
64        display: block;
65        transform-origin: left;
66      }
67
68      :host([opulent]) {
69        --range-start: calc(
70          2.5rem + 3.75rem + 2.5rem
71        ); /* offset spacings and feature bar to start progress animation */
72
73        animation-fill-mode: both;
74        animation-name: scroll-progress-opulent;
75        animation-range-start: contain var(--scroll-padding);
76        animation-timeline: --article-progress-bar;
77      }
78
79      @keyframes scroll-progress {
80        from {
81          transform: scaleX(0);
82        }
83
84        to {
85          transform: scaleX(1);
86        }
87      }
88
89      @keyframes scroll-progress-opulent {
90        from {
91          display: none;
92        }
93
94        to {
95          display: block;
96        }
97      }
98    }
99  </style>
100`;var So=document.createElement("style");So.innerHTML=`
101  body {
102    timeline-scope: --article-progress-bar;
103  }
104
105  [data-progress-bar-subject] {
106    view-timeline-name: --article-progress-bar;
107  }
108`;var us=class extends HTMLElement{#e;#t;#n=2;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(wo.content.cloneNode(!0)),document.head.appendChild(So),this.#e=document.querySelector("[data-progress-bar-subject]")}connectedCallback(){this.#s(),this.#t=new ResizeObserver(()=>{this.#s()}),this.#t.observe(document.body)}disconnectedCallback(){this.#t?.disconnect()}#s(){let t=this.#e?.offsetHeight;if(!t)return;let i=window.innerHeight;t>i*this.#n?this.shadowRoot?.host.removeAttribute("hidden"):this.shadowRoot?.host.setAttribute("hidden","")}};"customElements"in window&&CSS.supports("animation-timeline","auto")&&customElements.get("ws-article-progress-bar")===void 0&&customElements.define("ws-article-progress-bar",us);var To="bookmarkbutton",ko=document.createElement("template");ko.innerHTML=`
109  <style>
110    :host {
111      display: block;
112    }
113    :host([hidden]) {
114      display: none;
115    }
116  </style>
117  <slot></slot>
118`;var pp="Von Merkliste entfernen",fp="Zur Merkliste hinzuf\xFCgen",gp="icon-bookmark-filled",mp="icon-bookmark",ds=class extends HTMLElement{static observedAttributes=["active","disabled"];#e;#t;#n=null;#s=null;#i=null;get csrfRef(){return this.getAttribute("csrf-ref")||""}get contentId(){return this.getAttribute("content-id")||""}get paidCategory(){return this.getAttribute("paid-category")}get disabled(){return this.hasAttribute("disabled")}get active(){return this.hasAttribute("active")}set active(t){t?this.setAttribute("active",""):this.removeAttribute("active")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ko.content.cloneNode(!0)),this.#e=this.shadowRoot.querySelector("slot").assignedElements()[0],this.#t=this.#e.querySelector("i")}async connectedCallback(){this.#f(this.active),this.#r(),this.#n=await this.#a("ws-snackbar"),this.#s=await this.#a("ws-bookmarklist"),this.#s&&(this.#i=await this.#a("ws-bookmarkmanager"))}#r(){this.#e.addEventListener("click",()=>{this.disabled||(this.active?this.#d():this.#o(!1))})}async#a(t){let i=document.querySelector(t);return await window.customElements.whenDefined(t).then(async()=>i)}async getCSRFToken(){let t=document.querySelector(this.csrfRef);if(!t)throw new Error("Attribute 'csrf-ref' must point to a valid CSRF token provider.");return await window.customElements.whenDefined(t.tagName.toLowerCase()).then(async()=>
118{if(!t||!("token"in t))throw new Error("Attribute 'csrf-ref' must point to a valid CSRF token provider.");return await t.token})}async#o(t){this.active=!0;let i="/p-api/lists/bookmarks/items";try{let n=await this.getCSRFToken();if(!n)throw new Error("Request failed: CSRF token is not defined.");let s=await fetch(i,{method:"POST",body:JSON.stringify({contentId:this.contentId,paidCategories:this.paidCategory?this.paidCategory.split(","):[]}),headers:{"X-CSRF-Token":n}});if(!s.ok)throw new Error(`Request failed: ${s.status} - ${s.statusText}`);let r={tracking_active:this.hasAttribute("data-tracking-active"),bookmark_state:this.active?"added":"removed",content:{id:this.contentId,headline:this.dataset.headline,type:this.dataset.targetType,brand:this.dataset.brandIdentifier,product_content_status:this.dataset.trackingPaidCategory,teaser_type:this.dataset.teaserType}};if(S.publish(is,To,r),!t){let a=()=>window.scrollTo(0,0),l=()=>{window.location.href="/merkliste/"},u=this.#s?a:l;this.#n?.show("Zur Merkliste hinzugef\xFCgt.","Zur Merkliste",u)}this.#s&&(await this.#s.load(),this.#i?.updateBookmarkButtons())}catch(n){this.active=!1,this.#c(n)}}async#d(){this.active=!1;let t=`/p-api/lists/bookmarks/items/${this.contentId}`;try{let i=await this.getCSRFToken();if(!i)throw new Error("Request failed: CSRF token is undefined.");let n=await fetch(t,{method:"DELETE",headers:{"X-CSRF-Token":i}});if(!n.ok)throw new Error(`Request failed: ${n.status} - ${n.statusText}`);let s={tracking_active:this.hasAttribute("data-tracking-active"),bookmark_state:this.active?"added":"removed",content:{id:this.contentId,headline:this.dataset.headline,type:this.dataset.targetType,brand:this.dataset.brandIdentifier,product_content_status:this.dataset.trackingPaidCategory,teaser_type:this.dataset.teaserType}};S.publish(is,To,s),this.#n?.show("Von der Merkliste entfernt.","R\xFCckg\xE4ngig",()=>{this.#o(!0)}),this.#s&&(await this.#s.load(),this.#i?.updateBookmarkButtons())}catch(i){this.active=!0,this.#c(i)}}#u(t,i={}){this.dispatchEvent(new CustomEvent(t,{detail:{...i,contentId:this.contentId,paidCategory:this.paidCategory}}))}#c(t){let i;t instanceof Error?i=t.message:i=String(t),console.error(i),this.#u("error",{message:i}),this.#n?.show("Verbindungsfehler. Bitte versuchen Sie es sp\xE4ter noch einmal.","",()=>{})}#f(t){let i=this.#e.querySelector(".u-visually-hidden");i&&(i.textContent=t?pp:fp),this.#t.className=t?gp:mp}attributeChangedCallback(t,i,n){t==="active"&&this.#f(n!==null)}};"customElements"in window&&customElements.get("ws-bookmarkbutton")===void 0&&customElements.define("ws-bookmarkbutton",ds);var hs=class extends HTMLElement{#e="/p-api/lists/bookmarks/items";static get observedAttributes(){return["disabled"]}get disabled(){return this.hasAttribute("disabled")}constructor(){super();let t=document.createElement("style");t.innerHTML=`
119      ws-bookmarklist {
120        display: block;
121      }
122    `,document.head.appendChild(t)}connectedCallback(){window.addEventListener("pageshow",this.#n),this.#t()}disconnectedCallback(){window.removeEventListener("pageshow",this.#n)}#t(){this.disabled||this.load()}#n=t=>{t.persisted&&this.#t()};async load(){this.dispatchEvent(new CustomEvent("loading"));let t=await this.getContentIds();if(t){let i=await this.fetchBookmarkListFragment(t).catch(n=>(this.handleError(n.message),null));i?this.#i(i):this.#r()}else this.#r()}async getContentIds(){let t=await this.#s(this.#e).catch(i=>{this.handleError(i.message)});if(t){if(t.items?.length>0)return t.items.map(n=>n.contentId).join();this.handleError("Keine Eintr\xE4ge vorhanden.")}}async#s(t){let i=await fetch(t,{headers:{accept:"application/json"}});return i.ok?await i.json():(console.error("Error loading bookmark list items"),"")}async fetchBookmarkListFragment(t){let i=`/xhr/search/?contentId=${t}`,n=await fetch(i);return n.ok?await n.text():(console.error("Error loading bookmark list fragments"),"Keine Eintr\xE4ge vorhanden.")}handleError(t){let i=`<p>${t}</p>`;this.#i(i)}#i(t){let i=document.createRange().createContextualFragment(t),n=Array.from(i.children);return this.innerHTML="",this.appendChild(i),n}#r(){let t=this.getAttribute("data-title")?.trim()||"Noch keine gemerkten Inhalte",i=this.getAttribute("data-subtitle")?.trim()||"Wie funktioniert die Merkliste",n=this.getAttribute("data-article-id")?.trim()||"40903824",s=this.getAttribute("data-new-tab")?.toLowerCase()==="true"||!1,r=window.location.protocol,a=window.location.host,l=`${r}//${a}/${n}`,o=(()=>{let c=`<p class="bookmarklist-empty-state__title">${t}</p>`,d=`<a class="bookmarklist-empty-state__link" href="${l}" target="${s?"_blank":"_self"}">${i}</a>`;return`<div class="bookmarklist-empty-state">${c}${d}</div>`})();this.#i(o)}attributeChangedCallback(t,i,n){t==="disabled"&&n===null&&this.#t()}};customElements.get("ws-bookmarklist")??customElements.define("ws-bookmarklist",hs);var ps=class extends HTMLElement{#e="/p-api/lists/bookmarks/items";#t=[];constructor(){super()}async#n(){this.dispatchEvent(new CustomEvent("loading"));let t=await this.#s(this.#e).catch(i=>{console.error(i.message)});t&&((!t.items||!Array.isArray(t.items))&&(t.items=[]),this.#t=t.items.map(i=>i.contentId))}async#s(t){let i=await fetch(t,{headers:{accept:"application/json"}});if(!i?.ok)throw new Error("An error occurred while fetching the bookmark list.");return await i.json()}#i=()=>{document.querySelectorAll("ws-bookmarkbutton").forEach(i=>
122{i.active=this.#t.includes(i.contentId)})};updateBookmarkButtons(){this.#n().then(this.#i)}connectedCallback(){this.updateBookmarkButtons()}getContentIds(){return this.#t}};customElements.get("ws-bookmarkmanager")??customElements.define("ws-bookmarkmanager",ps);var bp="breaking-news",fs=class extends HTMLElement{#e=null;#t=null;#n=null;#s=null;#i=15e3;#r=3;#a=null;constructor(){super()}connectedCallback(){this.#e=this.querySelector(".breaking-news"),this.#t=this.querySelector(".breaking-news__inner"),this.#n=this.querySelector(".breaking-news__content"),this.#e&&this.#t&&(this.#o(),this.#d())}disconnectedCallback(){this.#p()}#o=()=>{this.#e&&S.publish(Za,bp,{element:this.#e})};#d=()=>{this.#e&&this.#e.scrollWidth>this.#e.clientWidth&&this.#u()&&this.#c()};#u=()=>{let t=window.matchMedia("(max-width: 767px)").matches,i=window.matchMedia("(prefers-reduced-motion: no-preference)").matches;return t&&i};#c=()=>{!this.#e||!this.#t||!this.#n||(this.#s=this.#n.cloneNode(!0),this.#s.setAttribute("aria-hidden","true"),this.#t.appendChild(this.#s),this.#i=this.#t.scrollWidth*12,this.#e.style.setProperty("--duration",`${this.#i}ms`),this.#e.style.setProperty("--repeat",`${this.#r}`),this.#t.classList.add("animate"),this.#a=setTimeout(this.#p,this.#i*this.#r+200),this.#e.addEventListener("pointerdown",this.#p))};#f=()=>{!this.#t||!this.#s||(this.#t.classList.remove("animate"),this.#t.removeChild(this.#s))};#l=()=>{this.#a!==null&&(clearTimeout(this.#a),this.#a=null)};#p=()=>{this.#l(),this.#f(),this.#e?.removeEventListener("pointerdown",this.#p)}};"customElements"in window&&customElements.get("ws-breaking-news")===void 0&&customElements.define("ws-breaking-news",fs);var gs=class extends HTMLElement{connectedCallback(){let t=this.querySelector(".dialog__close-button"),i=this.querySelector("dialog");t&&i&&(t.addEventListener("click",function(){i.close()}),i.addEventListener("click",n=>{n.target===i&&i.close()}))}};customElements.get("ws-dialog")??customElements.define("ws-dialog",gs);var Ao=document.createElement("template");Ao.innerHTML=`
123  <style>
124    :host {
125      display: block;
126    }
127
128    :host([hidden]) {
129      display: none;
130    }
131
132    .dots {
133      align-items: center;
134      display: flex;
135      gap: 8px;
136      justify-content: center;
137    }
138
139    .dot {
140      aspect-ratio: 1;
141      background-color: var(--dot-background-color);
142      border-radius: 50%;
143      display: block;
144      inline-size: 8px;
145      transition: width 100ms, background-color 200ms;
146    }
147
148    .dot.active {
149      background-color: var(--dot-background-color-active);
150    }
151
152    .dot.hidden {
153      display: none;
154    }
155
156    .dot.small {
157      inline-size: 6px;
158    }
159
160    .dot.smaller {
161      inline-size: 4px;
162    }
163  </style>
164  <div class="dots"></div>
165`;var ms=class extends HTMLElement{#e=!1;#t;#n;#s={_:"hidden",".":"smaller",o:"small",O:"default",X:"active"};static observedAttributes=["active-dot"];set numberOfDots(t){this.setAttribute("number-of-dots",t.toString())}get numberOfDots(){return parseInt(this.getAttribute("number-of-dots")??"0")}set activeDot(t){this.setAttribute("active-dot",t.toString())}get activeDot(){return parseInt(this.getAttribute("active-dot")??"0")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ao.content.cloneNode(!0)),this.#t=this.shadowRoot.querySelector(".dots")}connectedCallback(){this.#i(),this.#e=!0}#i=()=>
165{if(!this.numberOfDots||!this.activeDot)return;let t=new DocumentFragment;for(let i=1;i<=this.numberOfDots;i++){let n=document.createElement("span");t.appendChild(n)}this.#t.appendChild(t),this.#n=Array.from(this.#t.children),this.#r()};#r=()=>{if(!this.numberOfDots||!this.activeDot)return;let t=this.#o(this.activeDot,this.numberOfDots);t&&t.length===this.#n.length&&this.#n.forEach((i,n)=>{i.className="dot";let s=t[n];s&&this.#s[s]&&i.classList.add(this.#s[s])})};#a=(t,i,n)=>{i<0&&(i=t.length+i+1);let s=t.substring(0,i-1),r=t.substring(i+n.length-1);return s+n+r};#o=(t,i)=>{if(i<7){let s=t-1,r=i-t;return"O".repeat(s)+"X"+"O".repeat(r)}let n="_".repeat(i);if(t===1)return this.#a(n,1,"XOo.");if(t===2)return this.#a(n,1,"OXo.");if(t===3)return this.#a(n,1,"oOXo.");if(t===4)return this.#a(n,1,"oOOXo.");if(t>4&&i-t>1)return this.#a(n,t-4,".oOOXo.");if(i-t===1)return this.#a(n,-6,".oOOXo");if(i-t===0)return this.#a(n,-5,".oOOX")};attributeChangedCallback(t,i,n){this.#e&&t==="active-dot"&&n&&n!==i&&this.#r()}};"customElements"in window&&customElements.get("ws-dot-indicator")===void 0&&customElements.define("ws-dot-indicator",ms);var Di="drawer",bs="768px",Hi="200ms",Co=document.createElement("template");Co.innerHTML=`
166  <style>
167    :host {
168      inset: 0;
169      pointer-events: none;
170      position: fixed;
171      z-index: 2000000;
172    }
173
174    :host([opened]) {
175      pointer-events: auto;
176      visibility: visible;
177    }
178
179    :host([position="right"]) > .drawer-container {
180      inset-inline: auto 0;
181    }
182
183    .drawer-scrim {
184      background: rgba(0, 0, 0, 0.2);
185      inset: 0;
186      opacity: 0;
187      position: absolute;
188      transition: opacity ${Hi} ease-out;
189    }
190
191    :host([opened]) .drawer-scrim {
192      opacity: 1;
193    }
194
195    .drawer-container {
196      background-color: var(--ws-drawer-background-color, #fff);
197      display: flex;
198      flex-direction: column;
199      inline-size: min(100%, 440px);
200      inset: 0 auto 0 0;
201      position: absolute;
202      transform: translateX(0);
203      z-index: 1;
204    }
205
206    @media (min-width: ${bs}) {
207      .drawer-container {
208        transform: translateX(-100%);
209        opacity: 1;
210      }
211    }
212
213    :host([closed]) .drawer-container {
214      visibility: hidden;
215    }
216
217    @media (min-width: ${bs}) {
218      :host([position="right"]) .drawer-container {
219        transform: translateX(100%);
220      }
221    }
222
223    :host([opened]) .drawer-container {
224      transform: translateX(0%);
225      opacity: 1;
226      overflow-y: scroll;
227      visibility: visible;
228    }
229
230    .drawer-header {
231      align-items: center;
232      background-color: var(--ws-drawer-background-color, #fff);
233      display: flex;
234      inset-block-start: 0;
235      justify-content: flex-start;
236      padding-block: var(--ws-drawer-header-padding-block, 0);
237      padding-inline: var(--ws-drawer-header-padding-inline, 0);
238      position: sticky;
239      z-index: 1;
240    }
241
242    :host([header-shadow]) .drawer-header {
243      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
244    }
245
246    .drawer-close-button {
247      align-items: center;
248      appearance: none;
249      background-color: var(--ws-drawer-background-color, #fff);
250      border-radius: 0.25rem;
251      border: none;
252      color: var(--ws-drawer-color, #000);
253      cursor: pointer;
254      display: flex;
255      flex-shrink: 0;
256      font: 500 1rem /1.2 var(--ws-drawer-close-text-font-family);
257      gap: 0.5rem;
258      margin-block: var(--ws-drawer-close-button-margin-block, 0);
259      margin-inline: var(--ws-drawer-close-button-margin-inline, 0);
260      padding-block: var(--ws-drawer-close-button-padding-block, 0);
261      padding-inline: var(--ws-drawer-close-button-padding-inline, 0);
262      transition: background-color 0.3s;
263
264      &:hover,
265      &:focus-visible {
266        --ws-drawer-background-color: var(
267          --ws-drawer-close-button-background-color-hover,
268          #fff
269        );
270      }
271
272      &:active {
273        --ws-drawer-background-color: var(
274          --ws-drawer-close-button-background-color-active,
275          #fff
276        );
277      }
278    }
279
280    .drawer-close-icon::before {
281      content: var(--ws-drawer-close-icon-content);
282      display: flex;
283      font: normal 1.5rem/1 var(--ws-drawer-close-icon-font-family);
284    }
285
286    :host([position="right"]) .drawer-close-button {
287      flex-direction: row-reverse;
288      margin-inline-start: auto;
289    }
290
291    .drawer-footer {
292      margin-block-start: auto;
293    }
294
295    @media (prefers-reduced-motion: no-preference) {
296      @keyframes animateOpen {
297        to {
298          transform: translateX(0%);
299        }
300      }
301
302      @keyframes animateClose {
303        from {
304          transform: translateX(0%);
305        }
306      }
307
308      @keyframes fadeIn {
309        from {
310          opacity: 0;
311        }
312        to {
313          opacity: 1;
314        }
315      }
316
317      @keyframes fadeOut {
318        from {
319          opacity: 1;
320        }
321        to {
322          opacity: 0;
323        }
324      }
325
326      :host([closing]) .drawer-container {
327        animation-name: fadeOut;
328        animation-duration: ${Hi};
329        animation-fill-mode: forwards;
330      }
331
332      :host([opening]) .drawer-container {
333        animation-name: fadeIn;
334        animation-duration: ${Hi};
335        animation-fill-mode: forwards;
336        animation-delay: 0;
337      }
338
339      :host([opening]) .drawer-scrim {
340        animation-name: fadeIn;
341        animation-duration: ${Hi};
342        animation-fill-mode: forwards;
343        animation-delay: 0;
344      }
345
346      @media (min-width: ${bs}) {
347        :host([closing]) .drawer-container {
348          animation-name: animateClose;
349        }
350
351        :host([opening]) .drawer-container {
352          animation-name: animateOpen;
353          animation-delay: 0;
354        }
355
356        :host([opening]) .drawer-container {
357          animation-delay: 0;
358        }
359      }
360    }
361  </style>
362
363  <div class="drawer-scrim" aria-hidden="true"></div>
364  <div class="drawer-container">
365    <header class="drawer-header">
366      <button class="drawer-close-button" aria-label="schlie\xDFen">
367        <i class="drawer-close-icon" aria-hidden="true"></i>Schlie\xDFen
368      </button>
369    </header>
370    <slot></slot>
371    <footer class="drawer-footer">
372      <slot name="footer"></slot>
373    </footer>
374  </div>
375`;var ys=class extends HTMLElement{static observedAttributes=["opening","opened","closing","closed","position","header-shadow"];#e;#t;#n;#s;#i;#r;#a;#o;get position(){return this.getAttribute("position")||"left"}set position(t){this.setAttribute("position",t.toLowerCase())}get opening(){return this.hasAttribute("opening")}set opening(t){t?this.setAttribute("opening",""):this.removeAttribute("opening")}get opened(){return this.hasAttribute("opened")}set opened(t){t?this.setAttribute("opened",""):this.removeAttribute("opened")}get closing(){return this.hasAttribute("closing")}set closing(t){t?this.setAttribute("closing",""):this.removeAttribute("closing")}get closed(){return this.hasAttribute("closed")}set closed(t){t?this.setAttribute("closed",""):this.removeAttribute("closed")}get headerShadow(){return this.hasAttribute("header-shadow")}set headerShadow(t){t?this.setAttribute("header-shadow",""):this.removeAttribute("header-shadow")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Co.content.cloneNode(!0)),this.#e=null,this.#t=this.shadowRoot.querySelector("button.drawer-close-button"),this.#n=this.shadowRoot.querySelector("div.drawer-scrim"),this.#s=this.shadowRoot.querySelector("div.drawer-container"),this.#i=this.shadowRoot.querySelector("slot");let t=Array.from(this.shadowRoot.querySelectorAll("button")),i=[];for(let n of this.#i.assignedNodes())n instanceof HTMLElement&&(i=i.concat(Array.from(n.querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]"))));this.#r=[...t,...i],this.#a=this.#r[0],this.#o=this.#r[this.#r.length-1],this.#d()}#d(){this.opened?(this.#p(),this.#f(),this.closed=!1):(this.closed=!0,this.#h())}connectedCallback(){this.#e=document.querySelector(`[data-drawertarget="${this.id}"]`),this.#e&&this.#e.addEventListener("click",this.toggle),this.#t.addEventListener("click",this.toggle),this.#n.addEventListener("click",this.toggle),document.addEventListener("keydown",this.#u)}#u=t=>{if(t.key==="Escape")this.close();else if(t.key==="Tab"||t.keyCode===9)this.#c(t);else return};#c(t){if(t.key!=="Tab")return;let i=document.activeElement===this?this.shadowRoot.activeElement:document.activeElement;t.shiftKey?i===this.#a&&(this.#o.focus(),t.preventDefault()):i===this.#o&&(this.#a.focus(),t.preventDefault())}#f(){let t=this.querySelector("[autofocus]"),i=this.#r.indexOf(t);(this.#r[i]??this.#r[0]).focus()}open=async()=>{this.opened||(this.closed=!1,this.opening=!0,S.publish(to,Di),await this.#l(this.#s),this.opened=!0,this.opening=!1,S.publish(eo,Di),this.#n.setAttribute("aria-hidden","false"),this.#p(),this.#f())};close=async()=>{this.opened&&(this.opened=!1,this.closing=!0,S.publish(Ja,Di),await this.#l(this.#s),this.closed=!0,this.closing=!1,S.publish(ri,Di),this.#n.setAttribute("aria-hidden","true"),this.#h(),this.#e&&this.#e.focus())};#l(t){return Promise.allSettled(t.getAnimations().map(i=>i.finished))}toggle=()=>{this.opened?this.close():this.open()};#p(){this.#r.forEach(t=>{t.setAttribute("tabindex","0")})}#h(){this.#r.forEach(t=>{t.setAttribute("tabindex","-1")})}disconnectedCallback(){this.#e&&this.#e.removeEventListener("click",this.toggle),this.#t.removeEventListener("click",this.toggle),this.#n.removeEventListener("click",this.toggle),document.removeEventListener("keydown",this.#u)}};customElements.get("ws-drawer")??customElements.define("ws-drawer",ys);var yp="fetch",Io=document.createElement("template");Io.innerHTML="<slot></slot>";var vs=class extends HTMLElement{static observedAttributes=["disabled"];#e;get disabled(){return this.hasAttribute("disabled")}get loading(){return this.getAttribute("loading")??"eager"}get refetch(){return this.getAttribute("refetch")??""}get replace(){return this.getAttribute("replace")??"within"}get src(){return this.getAttribute("src")??""}get viewport(){return this.getAttribute("viewport")??"document"}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Io.content.cloneNode(!0))}attributeChangedCallback(t,i,n){t==="disabled"&&i===""&&n===null&&this.#n()}connectedCallback(){this.disabled||this.#n()}#t(){return this.viewport==="parent"?this.parentElement:this.viewport==="parentViewport"&&li(this.parentElement)?this.parentElement.getViewportElement():null}#n(){this.loading==="visible"?(this.#e=new IntersectionObserver(this.#s,{root:this.#t(),rootMargin:"200%",threshold:1}),this.#e.observe(this)):this.#i(),this.refetch==="visible"&&document.addEventListener("visibilitychange",this.#o)}#s=t=>{t[0]?.isIntersecting&&this.#i()};#i(){this.#r().then(t=>{this.#a(t),this.#e?.disconnect(),S.publish(io,yp)})}async#r(){if(!this.src)return"";let t=await window.fetch(this.src);return t.ok?await t.text():""}#a(t){this.replace==="self"?this.outerHTML=t:this.innerHTML=t}disconnectedCallback(){this.#e?.disconnect(),document.removeEventListener("visibilitychange",this.#o)}#o=()=>{document.visibilityState==="visible"&&this.#i()}};customElements.get("ws-fetch")??customElements.define("ws-fetch",vs);var vp="gallery-embed",Lo=document.createElement("template");Lo.innerHTML=`
376  <style>
377    :host {
378      display: block;
379      position: relative;
380    }
381
382    :host([hidden]) {
383      display: none;
384    }
385
386    .scroll-container {
387      display: flex;
388      overflow-x: auto;
389      scroll-snap-type: x mandatory;
390      scrollbar-width: none;
391    }
392
393    .scroll-container::-webkit-scrollbar {
394      display: none;
395    }
396
397    .items::slotted(*) {
398      flex: none;
399      inline-size: 100%;
400      scroll-snap-align: start;
401    }
402
403    .navigation {
404      aspect-ratio: var(--ws-gallery-embed-navigation-aspect-ratio);
405      display: var(--ws-gallery-embed-navigation-display);
406      inset-block-start: 0;
407      inset-inline: 24px;
408      pointer-events: none;
409      position: absolute;
410      z-index: var(--ws-gallery-embed-navigation-z-index);
411    }
412
413    .navigation__buttons {
414      display: flex;
415      gap: var(--ws-gallery-embed-navigation-buttons-gap);
416      inset-block: var(--ws-gallery-embed-navigation-buttons-inset-block);
417      inset-inline: var(--ws-gallery-embed-navigation-buttons-inset-inline);
418      justify-content: space-between;
419      position: absolute;
420      transform: var(--ws-gallery-embed-navigation-buttons-transform);
421    }
422  </style>
423  <div class="scroll-container">
424    <slot class="items"></slot>
425  </div>
426  <nav class="navigation">
427    <slot name="counter"></slot>
428    <div class="navigation__buttons">
429      <slot name="previous"></slot>
430      <slot name="next"></slot>
431    </div>
432  </nav>
433  <div class="dots">
434    <slot name="dots"></slot>
435  </div>
436</div>
437`;var Es=class extends HTMLElement{#e;#t=0;#n;#s;#i=0;#r;#a;#o;#d;#u;#c;#f;#l;#p;#h={};get loading(){return this.getAttribute("loading")??"eager"}get totalItems(){return this.getAttribute("total-items")??"0"}get dataHeadline(){return this.getAttribute("data-headline")??""}get dataTotalItems(){return this.getAttribute("data-total-items")??""}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Lo.content.cloneNode(!0)),this.#h.items=this.shadowRoot.querySelector(".items"),this.#o=this.#h.items.assignedElements(),this.#h.counter=this.shadowRoot.querySelector('slot[name="counter"]'),this.#r=this.#h.counter.assignedElements()[0],this.#e=this.#r.querySelector(".counter__current"),this.#h.next=this.shadowRoot.querySelector('slot[name="next"]'),this.#c=this.#h.next.assignedElements()[0],this.#h.previous=this.shadowRoot.querySelector('slot[name="previous"]'),this.#f=this.#h.previous.assignedElements()[0],this.#p=this.shadowRoot.querySelector(".scroll-container"),this.#h.dots=this.shadowRoot.querySelector('slot[name="dots"]'),this.#n=this.#h.dots.assignedElements()[0],this.#d=new IntersectionObserver(this.#v,{root:this.#p,rootMargin:"0px",threshold:.8}),this.loading==="interaction"&&(this.#s=new Ye(this.#g)),this.#u=new MutationObserver(this.#b),this.#l=new ResizeObserver(t=>{for(let i of t)this.#p.scroll({behavior:"instant",left:i.contentRect.width*this.#t})})}connectedCallback(){for(let t of this.#o)this.#d.observe(t);this.#l.observe(this.#p),this.#u.observe(this,{childList:!0}),this.#c&&this.#c.addEventListener("click",this.#E),this.#f&&this.#f.addEventListener("click",this.#y),this.loading==="interaction"?this.#s?.observe(document.body):this.#g()}getViewportElement(){return this.#p}#g=()=>{this.#s?.disconnect(),this.#o.forEach(t=>{t.removeAttribute("disabled")})};#v=t=>{let i=this.dataHeadline,n=this.dataTotalItems;for(let s of t)if(s.isIntersecting&&s.target instanceof HTMLElement){this.#t=Array.prototype.indexOf.call(this.#h.items.assignedElements(),s.target),this.#a=s.target.dataset.itemIndex;let r=s.target.dataset.itemNumber,a=s.target.dataset.itemType;a==="image-element"&&(a="image"),this.#m(r);let l=s.target.dataset.itemUrl,u=this.totalItems;this.#w(),this.#i>0&&(this.#k(),this.#T(),this.#S(this.#i,i,this.#a,r,a,l,u,n)),this.#i++}};#b=t=>{for(let i of t)i.type==="childList"&&(i.addedNodes.length>0&&i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.#d.observe(n)}),i.removedNodes.length>0&&i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.#d.unobserve(n)}),this.#w(),this.#k())};#S=(t,i,n,s,r,a,l,u)=>{let o={count:t,galleryHeadline:i,itemIndex:n,itemNumber:s,itemType:r,itemUrl:a,totalItems:l,totalItemsWithAds:u,adTagIds:["skyscraper_1","skyscraper_2","skyscraper_3","skyscraper_4","superbanner_1","wallpaper_1"]};S.publish(ke,vp,o)};#E=t=>{t.preventDefault(),this.#p.scroll({behavior:"instant",left:this.#p.scrollLeft+this.#p.clientWidth}
437)};#y=t=>{t.preventDefault(),this.#p.scroll({behavior:"instant",left:this.#p.scrollLeft-this.#p.clientWidth})};#w(){this.#c.inert=Math.ceil(this.#p.scrollLeft+this.#p.clientWidth)>=this.#p.scrollWidth,this.#f.inert=this.#p.scrollLeft===0}#m(t){t?(this.#e.textContent=t,this.#r.hidden=!1):this.#r.hidden=!0}#T(){this.#a&&(this.#n.activeDot=parseInt(this.#a))}#k(){if(!this.#a)return;let t=parseInt(this.#a);this.#h.items.assignedElements().forEach((n,s)=>{s++,s<t?n.classList.add("previous"):n.classList.remove("previous"),s===t?n.classList.add("active"):n.classList.remove("active"),s===t+1?n.classList.add("next"):n.classList.remove("next"),s>t+1?n.classList.add("following"):n.classList.remove("following")})}disconnectedCallback(){this.#c&&this.#c.removeEventListener("click",this.#E),this.#f&&this.#f.removeEventListener("click",this.#y),this.#d.disconnect(),this.#s?.disconnect(),this.#u.disconnect()}};"customElements"in window&&customElements.get("ws-gallery-embed")===void 0&&customElements.define("ws-gallery-embed",Es);var Po="gallery-index",Ro=document.createElement("template");Ro.innerHTML=`
438  <style>
439    :host {
440      display: block;
441      position: relative;
442    }
443
444    :host([hidden]) {
445      display: none;
446    }
447
448    .scroll-container {
449      display: flex;
450      overflow-x: auto;
451      scroll-snap-type: x mandatory;
452      scrollbar-width: none;
453    }
454
455    .scroll-container::-webkit-scrollbar {
456      display: none;
457    }
458
459    .items::slotted(*) {
460      flex: none;
461      inline-size: 100%;
462      scroll-snap-align: start;
463    }
464
465    .item-counter {
466      backdrop-filter: blur(6px);
467      background-color: var(--gallery-index-item-counter-background-color);
468      border-radius: 4px;
469      color: var(--gallery-index-item-counter-color);
470      padding-block: 4px;
471      padding-inline: 8px;
472    }
473
474    .item-counter[hidden] {
475      display: none;
476    }
477
478    .current-item {
479      color: var(--gallery-index-current-item-color);
480      font-weight: var(--gallery-index-current-item-font-weight);
481    }
482
483    .navigation {
484      aspect-ratio: 1;
485      block-size: var(--gallery-index-image-block-size);
486      inset-block-start: 0;
487      inset-inline-start: 0;
488      pointer-events: none;
489      position: absolute;
490      z-index: 2;
491    }
492
493    .navigation__buttons {
494      display: none;
495    }
496
497    .navigation__item-counter {
498      inset-block-start: var(--gallery-index-navigation-padding);
499      inset-inline-end: var(--gallery-index-navigation-padding);
500      position: absolute;
501    }
502
503    @media (min-width: 768px) {
504      .navigation__buttons {
505        display: flex;
506        gap: 12px;
507        inset-block-end: var(--gallery-index-navigation-padding);
508        inset-inline-end: var(--gallery-index-navigation-padding);
509        position: absolute;
510      }
511    }
512
513    @media (prefers-reduced-motion: no-preference) {
514      :host {
515        scroll-behavior: smooth;
516      }
517    }
518  </style>
519  <div class="scroll-container"><slot class="items"></slot></div>
520  <nav class="navigation">
521    <div class="navigation__item-counter item-counter">
522      <span class="current-item"></span>/<span class="total-items"></span>
523    </div>
524    <div class="navigation__buttons">
525      <slot name="previous"></slot>
526      <slot name="next"></slot>
527    </div>
528  </nav>
529  <div class="dots">
530    <slot name="dots"></slot>
531  </div>
532</div>
533`;var ws=class extends HTMLElement{#e;#t=0;#n;#s;#i=0;#r;#a;#o;#d;#u;#c;#f;#l;#p;#h={};#g;get loading(){return this.getAttribute("loading")??"eager"}get totalItems(){return this.getAttribute("total-items")??"0"}get dataHeadline(){return this.getAttribute("data-headline")??""}get dataTotalItems(){return this.getAttribute("data-total-items")??""}isRestricted(){return this.hasAttribute("data-is-restricted")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ro.content.cloneNode(!0)),this.#e=this.shadowRoot.querySelector(".current-item"),this.#r=this.shadowRoot.querySelector(".item-counter"),this.#h.items=this.shadowRoot.querySelector(".items"),this.#a=this.#h.items.assignedElements(),this.#h.next=this.shadowRoot.querySelector('slot[name="next"]'),this.#u=this.#h.next.assignedElements()[0],this.#h.previous=this.shadowRoot.querySelector('slot[name="previous"]'),this.#c=this.#h.previous.assignedElements()[0],this.#l=this.shadowRoot.querySelector(".scroll-container"),this.#g=this.shadowRoot.querySelector(".total-items"),this.#h.dots=this.shadowRoot.querySelector('slot[name="dots"]'),this.#n=this.#h.dots.assignedElements()[0],this.#o=new IntersectionObserver(this.#b,{root:this.#l,rootMargin:"0px",threshold:.6}),this.loading==="interaction"&&(this.#s=new Ye(this.#v)),this.#d=new MutationObserver(this.#S),this.#f=new ResizeObserver(t=>{for(let i of t)this.#l.scroll({behavior:"instant",left:i.contentRect.width*this.#t})})}connectedCallback(){this.#g.textContent=this.totalItems;for(let t of this.#a)this.#o.observe(t);this.#f.observe(this.#l),this.#d.observe(this,{childList:!0}),this.#u&&!this.isRestricted()&&this.#u.addEventListener("click",this.#y),this.#c&&!this.isRestricted()&&this.#c.addEventListener("click",this.#w),this.isRestricted()&&(this.#p=new Rt(()=>S.publish(qe,Po)),this.#p.observe(this.#l)),this.loading==="interaction"?this.#s?.observe(document.body):this.#v()}getViewportElement(){return this.#l}#v=()=>{this.#s?.disconnect(),this.#a.forEach(t=>{t.removeAttribute("disabled")})};#b=t=>{let i=this.dataHeadline,n=this.dataTotalItems;for(let s of t)if(s.isIntersecting&&s.target instanceof HTMLElement){this.#t=Array.prototype.indexOf.call(this.#h.items.assignedElements(),s.target);let r=s.target.dataset.itemIndex,a=s.target.dataset.itemNumber,l=s.target.dataset.itemType;l==="image-element"&&(l="image"),this.#T(a);let u=s.target.dataset.itemUrl,o=this.totalItems;this.#m(),this.#i>0&&(this.#C(r),this.#k(r),this.#E(this.#i,i,r,a,l,u,o,n)),this.#i++}};#S=t=>
533{for(let i of t)i.type==="childList"&&(i.addedNodes.length>0&&i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.#o.observe(n)}),i.removedNodes.length>0&&i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.#o.unobserve(n)}),this.#m())};#E=(t,i,n,s,r,a,l,u)=>{let o={count:t,galleryHeadline:i,itemIndex:n,itemNumber:s,itemType:r,itemUrl:a,totalItems:l,totalItemsWithAds:u,adTagIds:["skyscraper_1","skyscraper_2","skyscraper_3","skyscraper_4","superbanner_1","wallpaper_1"]};S.publish(ke,Po,o)};#y=t=>{t.preventDefault(),this.#l.scroll({behavior:"instant",left:this.#l.scrollLeft+this.#l.clientWidth})};#w=t=>{t.preventDefault(),this.#l.scroll({behavior:"instant",left:this.#l.scrollLeft-this.#l.clientWidth})};#m(){this.#u.inert=!this.isRestricted()&&Math.ceil(this.#l.scrollLeft+this.#l.clientWidth)>=this.#l.scrollWidth,this.#c.inert=this.#l.scrollLeft===0}#T(t){t?(this.#e.textContent=t,this.#r.hidden=!1):this.#r.hidden=!0}#k(t){t&&(this.#n.activeDot=parseInt(t))}#C(t){if(!t)return;let i=parseInt(t);this.#h.items.assignedElements().forEach((s,r)=>{r++,r===i?s.classList.add("active"):s.classList.remove("active")})}disconnectedCallback(){this.#u&&this.#u.removeEventListener("click",this.#y),this.#c&&this.#c.removeEventListener("click",this.#w),this.#p?.disconnect(),this.#o.disconnect(),this.#s?.disconnect(),this.#d.disconnect()}};"customElements"in window&&customElements.get("ws-gallery-index")===void 0&&customElements.define("ws-gallery-index",ws);var Vi="gallery-lead",xo=document.createElement("template");xo.innerHTML=`
534  <style>
535    :host {
536      display: block;
537      position: relative;
538    }
539
540    :host([hidden]) {
541      display: none;
542    }
543
544    .scroll-container {
545      display: flex;
546      overflow-x: auto;
547      scroll-snap-type: x mandatory;
548      scrollbar-width: none;
549    }
550
551    .scroll-container::-webkit-scrollbar {
552      display: none;
553    }
554
555    .items::slotted(*) {
556      flex: none;
557      inline-size: 100%;
558      scroll-snap-align: start;
559    }
560
561    .item-counter {
562      backdrop-filter: blur(6px);
563      background-color: var(--ws-gallery-lead-item-counter-background-color);
564      border-radius: 4px;
565      color: var(--ws-gallery-lead-item-counter-color);
566      inset-block-start: var(--ws-gallery-lead-space-block);
567      inset-inline-end: var(--ws-gallery-lead-space-inline);
568      padding-block: var(--ws-gallery-lead-item-counter-padding-block);
569      padding-inline: var(--ws-gallery-lead-item-counter-padding-inline);
570      position: absolute;
571      z-index: 2;
572    }
573
574    .item-counter[hidden] {
575      display: none;
576    }
577
578    .current-item {
579      color: var(--ws-gallery-lead-current-item-color);
580      font-weight: var(--ws-gallery-lead-current-item-font-weight);
581    }
582
583    .navigation {
584      aspect-ratio: var(--ws-gallery-lead-image-aspect-ratio);
585      display: none;
586      inset: 0 0 auto 0;
587      pointer-events: none;
588      position: absolute;
589    }
590
591    .navigation__buttons {
592      display: flex;
593      gap: 12px;
594      inset: auto 24px 24px auto;
595      position: absolute;
596    }
597
598    @media (min-width: 768px) {
599      .navigation {
600        display: block;
601      }
602    }
603
604    @media (min-width: 1024px) {
605      .navigation__buttons {
606        inset: auto 40px 30px auto;
607      }
608    }
609
610    @media (prefers-reduced-motion: no-preference) {
611      :host {
612        scroll-behavior: smooth;
613      }
614    }
615  </style>
616  <div class="scroll-container"><slot class="items"></slot></div>
617  <div class="item-counter" part="item-counter"><span class="current-item"></span>/<span class="total-items"></span></div>
618  <nav class="navigation">
619    <div class="navigation__buttons" part="navigation">
620      <slot name="previous"></slot>
621      <slot name="next"></slot>
622    </div>
623  </nav>
624
625  <div class="dots">
626    <slot name="dots"></slot>
627  </div>
628  <div class="thumbnails">
629    <slot name="thumbnails"></slot>
630  </div>
631</div>
632`;var Ss=class extends HTMLElement{#e;#t=0;#n;#s;#i=0;#r;#a;#o;#d;#u;#c;#f;#l;#p;#h;#g={};#v;#b;#S;#E;#y;#w;#m;get loading(){return this.getAttribute("loading")??"eager"}get pageNumber(){return parseInt(this.getAttribute("page-number")??"0")}get totalItems(){return this.getAttribute("total-items")??"0"}get dataHeadline(){return this.getAttribute("data-headline")??""}get dataTotalItems(){return this.getAttribute("data-total-items")??""}get isRestricted(){return this.hasAttribute("data-is-restricted")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(xo.content.cloneNode(!0)),this.#e=this.shadowRoot.querySelector(".current-item"),this.#r=this.shadowRoot.querySelector(".item-counter"),this.#g.items=this.shadowRoot.querySelector(".items"),this.#a=this.#g.items.assignedElements(),this.#g.next=this.shadowRoot.querySelector('slot[name="next"]'),this.#u=this.#g.next.assignedElements()[0],this.#g.previous=this.shadowRoot.querySelector('slot[name="previous"]'),this.#c=this.#g.previous.assignedElements()[0],this.#l=this.shadowRoot.querySelector(".scroll-container"),this.#v=this.shadowRoot.querySelector(".total-items"),this.#g.dots=this.shadowRoot.querySelector('slot[name="dots"]'),this.#n=this.#g.dots.assignedElements()[0],this.#g.thumbnails=this.shadowRoot.querySelector('slot[name="thumbnails"]'),this.#b=this.#g.thumbnails.assignedElements()[0],this.#S=this.#b.querySelector(".group-teaser-gallery__scroller"),this.#E=Array.from(this.#b.querySelectorAll(".teaser")),this.#p=document.querySelector("ws-paywall"),this.#o=new IntersectionObserver(this.#D,{root:this.#l,rootMargin:"0px",threshold:.6}),this.loading==="interaction"&&(this.#s=new Ye(this.#A)),this.#d=new MutationObserver(this.#H),this.#f=new ResizeObserver(t=>{for(let i of t)this.#l.scroll({behavior:"instant",left:i.contentRect.width*this.#t}),this.#T()}),this.#m=!1}connectedCallback(){this.#p?.getAttribute("paidcategory")==="str_dynamic"&&S.subscribe(rs,this.#x),this.#v.textContent=this.totalItems;for(let t of this.#a)this.#o.observe(t);this.#T(),this.#w=setTimeout(()=>{this.#C()},50),"onscrollend"in window?this.#l.addEventListener("scrollend",this.#T):this.#l.addEventListener("scroll",this.#k),this.#f.observe(this.#l),this.#d.observe(this,{childList:!0}),this.#u&&!(this.isRestricted||this.#m)&&this.#u.addEventListener("click",this.#P),this.#c&&!(this.isRestricted||this.#m)&&this.#c.addEventListener("click",this.#R),this.#E.forEac
632h(t=>{t.addEventListener("click",this.#N)}),this.#L(this.#t),this.isRestricted&&this.#_(),this.loading==="interaction"?this.#s?.observe(document.body):this.#A()}getViewportElement(){return this.#l}#T=()=>{let t=this.#g.items.assignedElements(),i=this.#l.clientWidth;if(!i||t.length===0)return;let n=Math.round(this.#l.scrollLeft/i),s=t[n];s&&(t.forEach(r=>{r.querySelectorAll("figcaption.show").forEach(a=>a.classList.remove("show"))}),s.querySelector("figcaption")?.classList.add("show"))};#k=()=>{this.#y&&clearTimeout(this.#y),this.#y=setTimeout(this.#T,100)};#C=()=>{this.#g.items.assignedElements()[this.#t]?.querySelector("figcaption")?.classList.add("show")};#A=()=>{this.#s?.disconnect(),this.#a.forEach(t=>{t.removeAttribute("disabled")})};#D=t=>{let i=this.dataHeadline,n=this.dataTotalItems;for(let s of t)if(s.isIntersecting&&s.target instanceof HTMLElement){this.#t=Array.prototype.indexOf.call(this.#g.items.assignedElements(),s.target);let r=s.target.dataset.itemIndex,a=s.target.dataset.itemNumber,l=s.target.dataset.itemType;l==="image-element"&&(l="image"),this.#U(a),this.#q(a),this.#W(a),this.#L(this.#t);let u=s.target.dataset.itemUrl,o=this.totalItems;this.#$(u),this.#O(),this.#i>0&&(this.#F(r),this.#B(r),this.#V(this.#i,i,r,a,l,u,o,n)),this.#i++}};#H=t=>{for(let i of t)i.type==="childList"&&(i.addedNodes.length>0&&(i.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.#o.observe(n)}),this.pageNumber>1&&this.#M(this.pageNumber)),i.removedNodes.length>0&&i.removedNodes.forEach(n=>{n instanceof HTMLElement&&this.#o.unobserve(n)}),this.#O(),this.#L(this.#t))};#x=()=>{this.#m=!0,this.#u&&(this.#u.removeEventListener("click",this.#P),this.#u.addEventListener("click",this.#I)),this.#c&&(this.#c.removeEventListener("click",this.#R),this.#c.addEventListener("click",this.#I)),this.#_()};#_=()=>{this.#h?.disconnect(),this.#h=new Rt(()=>S.publish(qe,Vi)),this.#h.observe(this.#l)};#V=(t,i,n,s,r,a,l,u)=>{let o={count:t,galleryHeadline:i,itemIndex:n,itemNumber:s,itemType:r,itemUrl:a,totalItems:l,totalItemsWithAds:u,adTagIds:["skyscraper_1","skyscraper_2","skyscraper_3","skyscraper_4","superbanner_1","superbanner_3","superbanner_6","wallpaper_1"]};S.publish(ke,Vi,o)};#L(t){let i=this.#g.items.assignedElements();!i||i.length===0||i.forEach((n,s)=>{let r=s===t;n.toggleAttribute("inert",!r),n.setAttribute("aria-hidden",(!r).toString())})}#P=t=>{t.preventDefault(),this.#l.scroll({behavior:"instant",left:this.#l.scrollLeft+this.#l.clientWidth})};#R=t=>{t.preventDefault(),this.#l.scroll({behavior:"instant",left:this.#l.scrollLeft-this.#l.clientWidth})};#M=t=>{if(!t)return;let i=t>3?Math.ceil((t-3)/3):0;this.#l.scroll({behavior:"instant",left:this.#l.clientWidth*(t+i-1)})};#I=t=>{t.preventDefault(),S.publish(qe,Vi)};#N=t=>{t.preventDefault();let i=t.target.closest(".group-teaser-gallery__item");i&&!i.classList.contains("active")&&i.dataset.imageNumber&&(this.isRestricted||this.#m?S.publish(qe,Vi):this.#M(parseInt(i.dataset.imageNumber)))};#O(){if(this.isRestricted||this.#m){let t=parseInt(this.totalItems,10),i=Number(this.#e.textContent);t<=1?(this.#u.inert=!0,this.#c.inert=!0):t>1&&(this.#u.inert=i===t,this.#c.inert=i===1)}else this.#u.inert=Math.ceil(this.#l.scrollLeft+this.#l.clientWidth)>=this.#l.scrollWidth,this.#c.inert=this.#l.scrollLeft===0}#U(t){t?(this.#e.textContent=t,this.#r.hidden=!1):this.#r.hidden=!0}#B(t){t&&(this.#n.activeDot=parseInt(t))}#F(t){if(!t)return;let i=parseInt(t);this.#g.items.assignedElements().forEach((s,r)=>{r++,r===i?s.classList.add("active"):s.classList.remove("active")})}#q(t){let i=t?parseInt(t):null;this.#E.forEach((n,s)=>{s++,s===i?n.classList.add("active"):n.classList.remove("active")})}#W(t){if(!t)return;let i=parseInt(t),n=this.#b.querySelector(".teaser").offsetWidth;window.innerWidth>=768?(n+=12,this.#S.scrollLeft=n*i-n*2):(n+=8,this.#S.scrollLeft=n*i-this.#S.offsetWidth/2-n/2-4)}#$(t){if(!t)return;let i=new URL(window.location.href),n=new URL(t);i.searchParams.forEach((s,r)=>{n.searchParams.set(r,s)});try{window.history.replaceState(null,"",n.toString())}catch(s){console.error("An unexpected error occurred:",s)}}disconnectedCallback(){this.#u&&!(this.isRestricted||this.#m)&&this.#u.removeEventListener("click",this.#P),this.#c&&!(this.isRestricted||this.#m)&&this.#c.removeEventListener("click",this.#R),this.#u&&this.#m&&this.#u.removeEventListener("click",this.#I),this.#c&&this.#m&&this.#c.removeEventListener("click",this.#I),this.#m&&S.unsubscribe(rs,this.#x),this.#E&&(!this.isRestricted||!this.#m)&&this.#E.forEac
632h(t=>{t.removeEventListener("click",this.#N)}),this.#o.disconnect(),this.#s?.disconnect(),this.#d.disconnect(),this.#l.removeEventListener("scrollend",this.#T),this.#l.removeEventListener("scroll",this.#k),this.#y&&clearTimeout(this.#y),this.#w&&clearTimeout(this.#w),this.#h?.disconnect()}};"customElements"in window&&customElements.get("ws-gallery-lead")===void 0&&customElements.define("ws-gallery-lead",Ss);function ut(e={}){return function(t,i){if(i.static)throw new TypeError("@attribute cannot be used statically.");if(i.private)throw new TypeError("@attribute cannot be used on private accessors.");return Ep(e,t,i)}}var Ts={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Array:case Object:return e==null?null:JSON.stringify(e);default:return e==null?null:String(e)}},fromAttribute(e,t){switch(t){case Boolean:return e!==null;case Number:return e===null?null:Number(e);case Array:case Object:if(e===null)return null;try{return JSON.parse(e)}catch{return null}default:return e}}};function Ep(e,t,i){let n=String(i.name),s=e.name??wp(n),r=e.type??String;return i.addInitializer(function(){let a=t.get.call(this),l=Ts.toAttribute(a,r);l!==null&&queueMicrotask(()=>{this.hasAttribute(s)||this.setAttribute(s,l)})}
632),{init(a){return a},get(){let a=this.getAttribute(s);return a===null?t.get.call(this):Ts.fromAttribute(a,r)},set(a){let l=Ts.toAttribute(a,r);l===null?this.removeAttribute(s):this.setAttribute(s,l)}}}function wp(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function _o(e){return function(t,i){if(i.kind!=="class")throw new TypeError("@customElement can only be applied to classes.");i.addInitializer(function(){if(!("customElements"in window))return;let n=customElements.get(e);if(n!==this){if(n!==void 0){console.warn(`@customElement: <${e}> is already registered to ${n.name||"an anonymous class"}; ignoring re-registration.`);return}customElements.define(e,this)}})}}var Fo=document.createElement("template");Fo.innerHTML=`
633  <style>
634    :host {
635      text-decoration: var(--ws-link-text-decoration);
636    }
637
638    :host(:hover),
639    :host(:focus) {
640      cursor: pointer;
641    }
642
643    :host([disabled]) {
644      pointer-events: none;
645    }
646  </style>
647
648  <slot></slot>
649`;var Mo,No,Oo,Do,Ho,Vo,Uo,Bo,ie,ks,As,Cs,Is,Ls,Ps,ci,ui,dt,Rs,qo;Bo=[_o("ws-link")];var Ce=class extends(Uo=HTMLElement,Vo=[ut({type:Boolean})],Ho=[ut({type:Number})],Do=[ut()],Oo=[ut()],No=[ut()],Mo=[ut()],Uo){constructor(){super();De(this,dt);De(this,ks,ge(ie,8,this,!1)),ge(ie,11,this);De(this,As,ge(ie,12,this,null)),ge(ie,15,this);De(this,Cs,ge(ie,16,this,null)),ge(ie,19,this);De(this,Is,ge(ie,20,this,"link")),ge(ie,23,this);De(this,Ls,ge(ie,24,this,"0")),ge(ie,27,this);De(this,Ps,ge(ie,28,this,"_self")),ge(ie,31,this);De(this,ci,i=>{si(this,dt,Rs).call(this),i.preventDefault(),i.stopPropagation()});De(this,ui,i=>{this.disabled||i.key!=="Enter"||(si(this,dt,Rs).call(this),i.preventDefault(),i.stopPropagation())});this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Fo.content.cloneNode(!0))}connectedCallback(){this.href?.includes("wdycf=%s")&&(this.href=si(this,dt,qo).call(this,this.href)),this.addEventListener("click",lt(this,ci)),this.addEventListener("keydown",lt(this,ui))}disconnectedCallback(){this.removeEventListener("click",lt(this,ci)),this.removeEventListener("keydown",lt(this,ui))}};ie=Xa(Uo),ks=new WeakMap,As=new WeakMap,Cs=new WeakMap,Is=new WeakMap,Ls=new WeakMap,Ps=new WeakMap,ci=new WeakMap,ui=new WeakMap,dt=new WeakSet,Rs=function(){let{href:i}=this;if(!i)return;let n=this.delay??0,s=this.target??"_self";n>0?(this.disabled=!0,this.tabindex="-1",setTimeout(()=>{window.open(i,s),this.disabled=!1,this.tabindex="0"},n)):window.open(i,s)},qo=function(i){let n=new URL(window.location.toString());return n.searchParams.set("cc_bust",Date.now().toString()),i.replace("wdycf=%s",`wdycf=${encodeURIComponent(n.toString())}`)},Ge(ie,4,"disabled",Vo,Ce,ks),Ge(ie,4,"delay",Ho,Ce,As),Ge(ie,4,"href",Do,Ce,Cs),Ge(ie,4,"role",Oo,Ce,Is),Ge(ie,4,"tabindex",No,Ce,Ls),Ge(ie,4,"target",Mo,Ce,Ps),Ce=Ge(ie,0,"Link",Bo,Ce),ge(ie,1,Ce);var xs=class e extends HTMLElement{#e={categories:void 0,email:void 0,hashedUserId:void 0,registrationStatus:void 0,sessionStatus:"none",trackingStatus:void 0,type:void 0,userId:void 0};#t;static registrationStatusKey="ws-user.registration_status";get loggedIn(){return this.hasAttribute("logged-in")}#n(){if(!ct("localStorage"))return;let t=localStorage.getItem(e.registrationStatusKey);if(typeof t!="string")return;let i=mo(t,this.#s);if(!(typeof i>"u")){if(i.expires<Date.now()){localStorage.removeItem(e.registrationStatusKey);return}return i.value}}#s(t){return typeof t=="object"&&typeof t.expires=="number"&&typeof t.value=="boolean"}#i(t){return typeof t=="object"&&typeof t.sessionStatus=="string"&&["active","needsRefresh","none"].includes(t.sessionStatus)}#r(t){if(!ct("localStorage"))return;let i={expires:Date.now()+1e3*60*60*24*365,value:t};localStorage.setItem(e.registrationStatusKey,JSON.stringify(i))}async getStatus(){if(this.#i(this.#t))return this.#t;let t=this.#e;if(this.loggedIn){let i=await fetch("/p-api/sso/status");if(!i.ok)throw new Error("Failed to fetch user status");let n=await i.json();if(!this.#i(n))throw new Error("Invalid user status response",n);t={...t,...n}}return["active","needsRefresh"].includes(t.sessionStatus)?(t.registrationStatus=!0,this.#r(!0)):t.registrationStatus=this.#n(),this.#t=t,this.#t}};customElements.get("ws-user")??customElements.define("ws-user",xs);async function Ui(){if(!("customElements"in window))return;let e=document.querySelector("ws-user");if(e)return await customElements.whenDefined("ws-user"),e.getStatus()}function Wo(){return!!document.querySelector("ws-user")?.loggedIn}var $o=document.createElement("template");$o.innerHTML="";var _s=class extends HTMLElement{#e=null;#t=null;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild($o.content.cloneNode(!0))}get debateName(){return this.#t}async fetchLogoraJWT(){let t=localStorage.getItem("logora-key");if(t)try{let i=JSON.parse(t);if(new Date(i.expire).getTime()>Date.now())return i.token}catch{localStorage.removeItem("logora-key")}try{let i=await fetch("/p-api/logora/jwt");if(!i.ok)return null;let n=await i.json();return localStorage.setItem("logora-key",JSON.stringify(n)),n.token}catch{return null}}async connectedCallback(){this.#e=this.parentElement?.querySelector("#logora-dialog"),this.#e?.addEventListener("close",this.#r),window.addEventListener("logoraContentLoaded",this.#n),window.addEventListener("logora:authentication:requested",this.#i);let t=this.closest("[data-logora-shortname]")?.getAttribute("data-logora-shortname")??this.getAttribute("shortname"),i="";Wo()?i=await this.fetchLogoraJWT()??"":localStorage.removeItem("logora-key"),window.logora_config={shortname:t,remote_auth:i};let n=document.createElement("script");n.src="https://cdn.logora.com/debat.js",n.async=!0,n.fetchPriority="high",document.body.appendChild(n)}disconnectedCallback(){window.removeEventListener("logoraContentLoaded",this.#n),window.removeEventListener("logora:authentication:requested",this.#i),this.#e?.removeEventListener("close",this.#r)}#n=t=>{this.#t=t.detail?.debate?.name??null};#s(){let t=document.querySelector('ws-gtm script[type="application/json"]');if(!t)return null;try{return JSON.parse(t.textContent??"{}")?.content??null}catch{return null}}#i=()=>{this.#e?.querySelectorAll("ws-link").forEach(i=>
649{let n=i.getAttribute("href");if(n?.includes("wdycf=")){let s=new URL(window.location.href);s.searchParams.set("cc_bust",Date.now().toString());let r=n.replace(/wdycf=[^&]*/,`wdycf=${encodeURIComponent(s.toString())}`);i.setAttribute("href",r)}});let t=this.#s();window.dataLayer.push({event:"regwall_shown",debateName:this.#t??"not_set",feature:{source:"regwall_logora"},content:{id:t?.id??"not_set",headline:t?.headline??"not_set",type:t?.type??"not_set"}}),this.#e?.showModal()};#r=()=>{let t=this.#s();window.dataLayer.push({event:"regwall_closed",debateName:this.#t??"not_set",feature:{source:"regwall_logora"},content:{id:t?.id??"not_set",headline:t?.headline??"not_set",type:t?.type??"not_set"}})}};"customElements"in window&&customElements.get("ws-logora")===void 0&&customElements.define("ws-logora",_s);var Ms=class e extends HTMLElement{static#e=!1;static#t="";get shortname(){return this.getAttribute("shortname")??""}get type(){return this.getAttribute("type")??""}get resourceId(){return this.getAttribute("resourceid")??""}connectedCallback(){if(this.shortname&&(e.#t=this.shortname),!this.type||!this.resourceId)return;let t=`logora_${this.resourceId}_${this.type}`,i=document.createElement("div");i.className="logora_embed",i.dataset.objectId=t,this.appendChild(i),window[t]={shortname:e.#t,resource:{name:this.type,id:this.resourceId}},e.#e||(e.#e=!0,queueMicrotask(()=>{let n=document.createElement("script");n.src="https://cdn.logora.com/embed.js",n.async=!0,document.head.appendChild(n)}))}};customElements.get("ws-logora-widget")??customElements.define("ws-logora-widget",Ms);var Ns=class extends HTMLElement{#e;get targetSelector(){return this.getAttribute("target-selector")}get parentWithViewport(){return this.getAttribute("parent-with-viewport")}get parentToObserve(){return this.getAttribute("parent-to-observe")}constructor(){super();let t=this.parentWithViewport&&this.closest(this.parentWithViewport),i=t&&li(t)?t.getViewportElement():li(this.parentElement)?this.parentElement.getViewportElement():null;this.#e=new IntersectionObserver(this.#t,{root:i,rootMargin:"100%",threshold:.9})}connectedCallback(){let t=this.parentToObserve&&this.closest(this.parentToObserve);this.#e.observe(t||this)}#t=t=>{for(let i of t){if(!i.isIntersecting||!this.targetSelector)return;let n=document.querySelectorAll(this.targetSelector);for(let s of n){if(this.contains(s))return;this.appendChild(s),s.removeAttribute("disabled")}}};disconnectedCallback(){this.#e.disconnect()}};"customElements"in window&&customElements.get("ws-magnet")===void 0&&customElements.define("ws-magnet",Ns);var A={1e4:"Gesch\xFCtzter Inhalt kann nicht wiedergegeben werden. Inhalt neu laden oder ein anderes Ger\xE4t verwenden.",11e3:"Authentifizierung fehlgeschlagen. Erneut anmelden und Inhalt neu starten.",11200:"Zugriffsrechte fehlen. Erneut anmelden und Inhalt neu starten.",11210:"Zugriffsrecht f\xFCr Bezahlinhalte fehlt. Erneut anmelden und Inhalt neu starten.",12100:"Dieser Inhalt ist im Land nicht verf\xFCgbar. Verbindung pr\xFCfen und VPN oder Proxy deaktivieren.",12110:"VPN oder Proxy erkannt. VPN oder Proxy deaktivieren und Inhalt neu starten.",12300:"Ger\xE4t erf\xFCllt die Anforderungen f\xFCr den Kopierschutz nicht (HDCP). Anderes Ger\xE4t, Kabel oder Browser verwenden.",12400:"Ger\xE4t erf\xFCllt die Anforderungen f\xFCr den Kopierschutz nicht (Ger\xE4t wird von Widevine nicht unterst\xFCtzt). Anderes Ger\xE4t oder Browser verwenden.",2e4:"Inhalt nicht verf\xFCgbar. Anderen Titel ausw\xE4hlen oder sp\xE4ter erneut versuchen.",3e4:"Inhalt kann nicht abgespielt werden. Inhalt neu laden oder anderes Ger\xE4t verwenden.",30100:"Inhalt kann nicht abgespielt werden. Anderes Ger\xE4t oder Browser verwenden.",31e3:"Netzwerkproblem. Internetverbindung \xFCberpr\xFCfen und erneut versuchen.",32e3:"Inhalt kann nicht abgespielt werden.",32100:"Ger\xE4t erf\xFCllt die Anforderungen f\xFCr den Kopierschutz nicht. Anderes Ger\xE4t oder Browser verwenden.",32200:"Ger\xE4t erf\xFCllt die Anforderungen f\xFCr den Stream nicht. Ger\xE4t oder Browser wechseln.",33100:"Maximale Anzahl gleichzeitiger Wiedergaben erreicht. Wiedergabe auf einem anderen Ger\xE4t beenden und erneut versuchen.",34e3:"Player-Konfigurationsproblem. Support kontaktieren.",34100:"Werbeblocker erkannt. Bitte deaktivieren und Inhalt neu laden.",35430:"Wiedergabe wegen Energiesparmodus abgebrochen. Inhalt neu laden.",4e4:"Inhalt kann nicht abgespielt werden. Sp\xE4ter erneut versuchen.",41800:`Inhalt konnte nicht geladen werden.
650
651Pr\xFCfe die Internetverbindung und versuche, den Inhalt erneut zu laden.`,42800:"Player-Konfigurationsproblem. Support kontaktieren.",5e4:"Player kann nicht geladen werden. Support kontaktieren.",59e3:"Inhalt kann nicht abgespielt werden. Support kontaktieren."};var zo={FALLBACK_DRM_ERROR_10000:{code:1e4,message:A[1e4]},AUTHENTICATION_FAILED_11000:{code:11e3,message:A[11e3]},TOKEN_PROBLEM_11100:{code:11100,message:A[11e3]},TOKEN_INVALID_11110:{code:11110,message:A[11e3]},TOKEN_MISSING_11120:{code:11120,message:A[11e3]},PERMISSION_PROBLEM_11200:{code:11200,message:A[11200]},PAY_PERMISSION_MISSING_11210:{code:11210,message:A[11210]},DOWNLOAD_PERMISSION_MISSING_11220:{code:11220,message:A[11200]},RIGHTS_RESTRICTIONS_NOT_MET_12000:{code:12e3,message:A[1e4]},HD_PERMISSION_MISSING_12010:{code:12010,message:A[1e4]},GEOBLOCKING_12100:{code:12100,message:A[12100]},USING_OF_AN_ANONYM_PROXY_OR_VPN_12110:{code:12110,message:A[12110]},LOCATION_NOT_ALLOWED_12120:{code:12120,message:A[12100]},HDCP_REQUIREMENT_NOT_FULFILLED_12300:{code:12300,message:A[12300]},DEVICE_IS_DENYLISTED_BY_GOOGLE_FOR_WIDEVINE_12400:{code:12400,message:A[12400]},LICENSE_13000:{code:13e3,message:A[1e4]},LICENSE_EXPIRED_13100:{code:13100,message:A[1e4]},LICENSE_NOT_PERSISTABLE_13200:{code:13200,message:A[1e4]},LICENSE_ENVIRONMENT_13300:{code:13300,message:A[1e4]},INVALID_MISSING_FAIRPLAY_CERTIFICATE_URL_13310:{code:13310,message:A[1e4]},INVALID_FAIRPLAY_CERTIFICATE_DATA_13320:{code:13320,message:A[1e4]},CONTENT_20000:{code:2e4,message:A[2e4]},MEDIA_FORMAT_UNSUPPORTED_20100:{code:20100,message:A[2e4]},AVAILABILITY_21000:{code:21e3,message:A[2e4]},CONTENT_NOT_AVAILABLE_21100:{code:21100,message:A[2e4]},SOURCE_MATERIAL_NOT_AVAILABLE_21110:{code:21110,message:A[2e4]},CONTENT_NOT_DOWNLOADABLE_21200:{code:21200,message:A[2e4]},CLIENT_30000:{code:3e4,message:A[3e4]},NO_PLAYABLE_TRACK_LEFT_30100:{code:30100,message:A[30100]},NETWORK_PROBLEM_31000:{code:31e3,message:A[31e3]},BAD_INTERNET_CONNECTION_31110:{code:31110,message:A[31e3]},PLATFORM_32000:{code:32e3,message:A[32e3]},UNSUPPORTED_DRM_32100:{code:32100,message:A[32100]},NO_DRM_OPTION_AVAILABLE_ANY_MORE_32110:{code:32110,message:A[32100]}
651,DRM_NOT_FULLY_IMPLEMENTED_32120:{code:32120,message:A[32100]},UNSUPPORTED_STREAM_TECH_32200:{code:32200,message:A[32200]},NO_MANIFESTS_PLAYABLE_32210:{code:32210,message:A[32200]},MANIFEST_NOT_SUPPORTED_32220:{code:32220,message:A[32200]},MAX_CONCURRENT_STREAMS_REACHED_33100:{code:33100,message:A[33100]},PLAYERCONFIG_PROBLEM_34000:{code:34e3,message:A[34e3]},ADBLOCKER_DETECTED_34100:{code:34100,message:A[34100]},VIDEOSOURCES_CONFIG_34200:{code:34200,message:A[34e3]},NO_MANIFEST_IN_CONFIG_34210:{code:34210,message:A[34e3]},MISSING_PLAYER_ELEMENT_OR_ID_34300:{code:34300,message:A[34e3]},FAULTY_ADVERTISING_ISLAND_CONFIGURED_34510:{code:34510,message:A[34e3]},PLAYER_ALREADY_DESTROYED_35100:{code:35100,message:A[3e4]},FAULTY_SETUP_FOR_NON_LINEAR_ADVERTISING_35210:{code:35210,message:A[3e4]},MISSING_USER_INTERACTION_35310:{code:35310,message:A[3e4]},OPERATION_ABORTED_35400:{code:35400,message:A[3e4]},OPERATION_ABORTED_PLAY_35410:{code:35410,message:A[3e4]},OPERATION_ABORTED_LOAD_35420:{code:35420,message:A[3e4]},OPERATION_ABORTED_POWER_SAVING_35430:{code:35430,message:A[35430]},OPERATION_ABORTED_VIDEO_REMOVED_35440:{code:35440,message:A[3e4]},OPERATION_NOT_SUPPORTED_35500:{code:35500,message:A[3e4]},DEPENDENCY_40000:{code:4e4,message:A[4e4]},V3_UNAVAILABLE_41100:{code:41100,message:A[4e4]},ENTITLEMENT_UNAVAILABLE_41200:{code:41200,message:A[4e4]},DB_UNAVAILABLE_41300:{code:41300,message:A[4e4]},GOOGLE_WIDEVINE_UNAVAILABLE_41400:{code:41400,message:A[4e4]},MANIFEST_API_UNAVAILABLE_41500:{code:41500,message:A[4e4]},OTHER_UNAVAILABLE_41600:{code:41600,message:A[4e4]},ATV_SCHEDULER_UNAVAILABLE_41700:{code:41700,message:A[4e4]},STUS_UNAVAILABLE_41800:{code:41800,message:A[41800]},ATV_SCHEDULER_REQUEST_FAILED_HTTP_STATUS_CODE_4XX_42700:{code:42700,message:A[4e4]},ATV_SCHEDULER_REQUEST_FAILED_HTTP_STATUS_CODE_5XX_42710:{code:42710,message:A[4e4]},STUS_RETURNS_4XX_ERROR_42800:{code:42800,message:A[42800]},STUS_RETURNS_5XX_ERROR_42810:{code:42810,message:A[42800]},ATV_SCHEDULER_REQUEST_TIMED_OUT_43700:{code:43700,message:A[4e4]},STUS_SCHEDULER_REQUEST_TIMED_OUT_43800:{code:43800,message:A[4e4]},INTERNAL_PLAYER_ERROR_50000:{code:5e4,message:A[5e4]},UNEXPECTED_EVENT_51000:{code:51e3,message:A[5e4]},PLAYER_DEPENDENCIES_COULD_NOT_BE_LOADED_52110:{code:52110,message:A[5e4]},PLAYER_DEPENDENCY_MISSING_52120:{code:52120,message:A[5e4]},PLAYER_DEPENDENCY_INVALID_52130:{code:52130,message:A[5e4]},ERROR_NOT_TREATED_59000:{code:59e3,message:A[59e3]}};var jo=function(e,t){let s="function",r="undefined",a="object",l="string",u="major",o="model",c="name",d="type",h="vendor",f="version",g="architecture",p="console",y="mobile",m="tablet",b="smarttv",v="wearable",T="embedded",M="Amazon",D="Apple",j="ASUS",R="BlackBerry",B="Browser",I="Chrome",N="Edge",H="Firefox",O="Google",U="Huawei",C="Microsoft",z="Motorola",K="Opera",X="Samsung",ue="Sharp",Q="Sony",ee="Xiaomi",G="Zebra",Fe="Facebook",at="Chromium OS",_i="Mac OS",ze=(V,F)=>{let _={};for(let le in V)F[le]&&F[le].length%2===0?_[le]=F[le].concat(V[le]):_[le]=V[le];return _},ot=V=>{let F={};for(let _=0;_<V.length;_++)F[V[_].toUpperCase()]=V[_];return F},de=(V,F)=>typeof V===l?Te(F).indexOf(Te(V))!==-1:!1,Te=V=>V.toLowerCase(),je=V=>typeof V===l?V.replace(/[^\d\.]/g,"").split(".")[0]:void 0,Ba=(V,F)=>{if(typeof V===l)return V=V.replace(/^\s\s*/,""),typeof F===r?V:V.substring(0,500)},ei=function(V,F){let _=0,le,Wa,Mi,Z,ii,Oe;for(;_<F.length&&!ii;){let es=F[_],$a=F[_+1];for(le=Wa=0;le<es.length&&!ii&&es[le];)if(ii=es[le++].exec(V),ii)for(Mi=0;Mi<$a.length;Mi++)Oe=ii[++Wa],Z=$a[Mi],typeof Z===a&&Z.length>0?Z.length===2?typeof Z[1]===s?this[Z[0]]=Z[1].call(this,Oe):this[Z[0]]=Z[1]:Z.length===3?typeof Z[1]===s&&!(Z[1].exec&&Z[1].test)?this[Z[0]]=Oe?Z[1].call(this,Oe,Z[2]):void 0:this[Z[0]]=Oe?Oe.replace(Z[1],Z[2]):void 0:Z.length===4&&(this[Z[0]]=Oe?Z[3].call(this,Oe.replace(Z[1],Z[2])):void 0):this[Z]=Oe||void 0;_+=2}},Jn=(V,F)=>{for(let _ in F)if(typeof F[_]===a&&F[_].length>0){for(let le=0;le<F[_].length;le++)if(de(F[_][le],V))return _==="?"?void 0:_}else if(de(F[_],V))return _==="?"?void 0:_;return V},Zh={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Fa={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},qa={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,f],[/opios[\/ ]+([\w\.]+)/i],[f,[c,`${K} Mini`]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[c,`${K} GX`]],[/\bopr\/([\w\.]+)/i],[f,[c,K]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[c,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,f],[/\bddg\/([\w\.]+)/i],[f,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[c,`UC${B}`]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[c,`Smart Lenovo ${B}
651`]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,`$1 Secure ${B}`],f],[/\bfocus\/([\w\.]+)/i],[f,[c,`${H} Focus`]],[/\bopt\/([\w\.]+)/i],[f,[c,`${K} Touch`]],[/coc_coc\w+\/([\w\.]+)/i],[f,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[c,`${K} Coast`]],[/miuibrowser\/([\w\.]+)/i],[f,[c,`MIUI ${B}`]],[/fxios\/([-\w\.]+)/i],[f,[c,H]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,`360 ${B}`]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[c,/(.+)/,`$1 ${B}`],f],[/samsungbrowser\/([\w\.]+)/i],[f,[c,`${X} Internet`]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],f],[/metasr[\/ ]?([\d\.]+)/i],[f,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,f],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Fe],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[c,`${I} Headless`]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,`${I} WebView`],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[c,`Android ${B}`]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[f,Jn,Zh]],[/(webkit|khtml)\/([\w\.]+)/i],[c,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[c,`${H} Reality`]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c,f],[/(cobalt)\/([\w\.]+)/i],[c,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,Te]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",Te]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,Te]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[h,X],[d,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[h,X],[d,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[h,D],[d,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[h,D],[d,m]],[/(macintosh);/i],[o,[h,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[h,ue],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[h,U],[d,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[h,U],[d,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[h,ee],[d,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[h,ee],[d,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[h,"OPPO"],[d,y]],[/\b(opd2\d{3}a?) bui/i],[o,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[h,"Vivo"],[d,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[h,"Realme"],[d,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[h,z],[d,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[h,z],[d,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[h,"LG"],[d,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[h,"LG"],[d,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[h,"Lenovo"],[d,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[h,"Nokia"],[d,y]],[/(pixel c)\b/i],[o,[h,O],[d,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[h,O],[d,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[h,Q],[d,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[h,Q],[d,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[h,"OnePlus"],[d,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[h,M],[d,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[h,M],[d,y]],[/(playbook);[-\w\),; ]+(rim)/i],[o,h,[d,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[h,R],[d,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[h,j],[d,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[h,j],[d,y]],[/(nexus 9)/i],[o,[h,"HTC"],[d,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[o,/_/g," "],[d,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[h,"Acer"],[d,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[h,"Meizu"],[d,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[h,"Ulefone"],[d,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
651s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,o,[d,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,o,[d,m]],[/(surface duo)/i],[o,[h,C],[d,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[h,"Fairphone"],[d,y]],[/(u304aa)/i],[o,[h,"AT&T"],[d,y]],[/\bsie-(\w*)/i],[o,[h,"Siemens"],[d,y]],[/\b(rct\w+) b/i],[o,[h,"RCA"],[d,m]],[/\b(venue[\d ]{2,7}) b/i],[o,[h,"Dell"],[d,m]],[/\b(q(?:mv|ta)\w+) b/i],[o,[h,"Verizon"],[d,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[h,"Barnes & Noble"],[d,m]],[/\b(tm\d{3}\w+) b/i],[o,[h,"NuVision"],[d,m]],[/\b(k88) b/i],[o,[h,"ZTE"],[d,m]],[/\b(nx\d{3}j) b/i],[o,[h,"ZTE"],[d,y]],[/\b(gen\d{3}) b.+49h/i],[o,[h,"Swiss"],[d,y]],[/\b(zur\d{3}) b/i],[o,[h,"Swiss"],[d,m]],[/\b((zeki)?tb.*\b) b/i],[o,[h,"Zeki"],[d,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],o,[d,m]],[/\b(ns-?\w{0,9}) b/i],[o,[h,"Insignia"],[d,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[h,"NextBook"],[d,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],o,[d,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],o,[d,y]],[/\b(ph-1) /i],[o,[h,"Essential"],[d,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[h,"Envizen"],[d,m]],[/\b(trio[-\w\. ]+) b/i],[o,[h,"MachSpeed"],[d,m]],[/\btu_(1491) b/i],[o,[h,"Rotor"],[d,m]],[/(shield[\w ]+) b/i],[o,[h,"Nvidia"],[d,m]],[/(sprint) (\w+)/i],[h,o,[d,y]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[h,C],[d,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[h,G],[d,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[h,G],[d,y]],[/smart-tv.+(samsung)/i],[h,[d,b]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[h,X],[d,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[d,b]],[/(apple) ?tv/i],[h,[o,`${D} TV`],[d,b]],[/crkey/i],[[o,`${I}cast`],[h,O],[d,b]],[/droid.+aft(\w+)( bui|\))/i],[o,[h,M],[d,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[h,ue],[d,b]],[/(bravia[\w ]+)( bui|\))/i],[o,[h,Q],[d,b]],[/(mitv-\w{5}) bui/i],[o,[h,ee],[d,b]],[/Hbbtv.*(technisat) (.*);/i],[h,o,[d,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,Ba],[o,Ba],[d,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,o,[d,p]],[/droid.+; (shield) bui/i],[o,[h,"Nvidia"],[d,p]],[/(playstation [345portablevi]+)/i],[o,[h,Q],[d,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[h,C],[d,p]],[/((pebble))app/i],[h,o,[d,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[h,D],[d,v]],[/droid.+; (glass) \d/i],[o,[h,O],[d,v]],[/droid.+; (wt63?0{2,3})\)/i],[o,[h,G],[d,v]],[/(quest( \d| pro)?)/i],[o,[h,Fe],[d,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,T]],[/(aeobc)\b/i],[o,[h,M],[d,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[d,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[d,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,y]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[c,`${N}HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[f,Jn,Fa]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,Jn,Fa],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,_i],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,f],[/\(bb(10);/i],[f,[c,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[c,`${H} OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[c,`${I}cast`]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,at],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,f],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,f]]},oe=typeof window!==r&&window.navigator?window.navigator:void 0,Ct=oe?.userAgentData?oe.userAgentData:void 0,ti=t?ze(qa,t):qa,It=()=>e||(oe?.userAgent?oe.userAgent:"");return{getBrowser:()=>{let V=It(),F=oe&&oe.userAgent===V,_={};return _[c]=void 0,_[f]=void 0,ei.call(_,V,ti.browser),_[u]=je(_[f]),F&&oe&&oe.brave&&typeof oe.brave.isBrave===s&&(_[c]="Brave"),_},getCPU:()=>{let V=It(),F={};return F[g]=void 0,ei.call(F,V,ti.cpu),F},getDevice:()=>{let V=It(),F=oe&&oe.userAgent===V,_={};return _[h]=void 0,_[o]=void 0,_[d]=void 0,ei.call(_,V,ti.device),F&&!_[d]&&Ct&&Ct.mobile&&(_[d]=y),F&&_[o]==="Macintosh"&&oe&&typeof oe.standalone!==r&&oe.maxTouchPoints&&oe.maxTouchPoints>2&&(_[o]="iPad",_[d]=m),_},getEngine:()=>{let V=It(),F={};return F[c]=void 0,F[f]=void 0,ei.call(F,V,ti.engine),F},getOS:()=>{let V=It(),F=oe&&oe.userAgent===V,_={};return _[c]=void 0,_[f]=void 0,ei.call(_,V,ti.os),F&&!_[c]&&Ct&&Ct.platform&&Ct.platform!=="Unknown"&&(_[c]=Ct.platform.replace(/chrome os/i,at).replace(/macos/i,_i)),_},getUA:It}};function Ko(){return{id:"",startTime:0,endTime:0,region:null,snapToLines:!0,line:"auto",lineAlign:"start",position:"auto",positionAlign:"auto",size:100,align:"center",vertical:"",pauseOnExit:!1,text:""}}
651function Xo(){return{id:"",width:100,lines:3,regionAnchorX:0,regionAnchorY:100,viewportAnchorX:0,viewportAnchorY:100,scroll:""}}var di=class extends Error{constructor(e){super(e),this.name="WebVttParsingError"}};function Bi(e,t,i,n){let s=n?e.split(n):[e];for(let r in s){if(typeof s[r]!="string")continue;let a=s[r].split(i);if(a.length!==2)continue;let l=a[0];t(l,a[1].trim())}}function Os(e,t,i,n){return(e|0)*3600+(t|0)*60+(i|0)+(n|0)/1e3}function Qo(e){let t=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);if(!t)return null;let i=parseInt(t[1]),n=parseInt(t[2]),s=parseInt(t[3]?.replace(":","")||"0"),r=parseInt(t[4]);return t[3]?Os(i,n,s,r):i>59?Os(i,n,0,r):Os(0,i,n,r)}var Fi=class{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||t===""||(this.values[e]=t)}get(e,t){return this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let n of i)if(t===n){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)){let i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}},Go="Malformed time stamp.";function Sp(e,t,i){let n=e;function s(){let l=Qo(e);if(l===null)throw new di(Go+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),l}function r(l,u){let o=new Fi;Bi(l,function(c,d){switch(c){case"region":for(let h=i.length-1;h>=0;h--)if(i[h].id===d){o.set(c,i[h]);break}break;case"vertical":o.alt(c,d,["rl","lr"]);break;case"line":{let h=d.split(","),f=h[0];o.integer(c,f),o.percent(c,f)&&o.set("snapToLines",!1),o.alt(c,f,["auto"]),h.length===2&&o.alt("lineAlign",h[1],["start","center","end"]);break}case"position":{let h=d.split(",");o.percent(c,h[0]),h.length===2&&o.alt("positionAlign",h[1],["line-left","center","line-right","auto"]);break}case"size":o.percent(c,d);break;case"align":o.alt(c,d,["start","center","end","left","right"]);break}},/:/,/\s/),u.region=o.get("region",null),u.vertical=o.get("vertical","");try{u.line=o.get("line","auto")}catch{}u.lineAlign=o.get("lineAlign","start"),u.snapToLines=o.get("snapToLines",!0),u.size=o.get("size",100);try{u.align=o.get("align","center")}catch{u.align=o.get("align","middle")}try{u.position=o.get("position","auto")}catch{u.position=o.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100}[u.align])}u.positionAlign=o.get("positionAlign","auto")}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=s(),a(),e.substr(0,3)!=="-->")throw new di(Go+" (time stamps must be separated by '-->'): ");e=e.substr(3),a(),t.endTime=s(),a(),r(e,t)}var Y={INITIAL:"INITIAL",HEADER:"HEADER",REGION:"REGION",STYLE:"STYLE",NOTE:"NOTE",BLOCKS:"BLOCKS",ID:"ID",CUE:"CUE",CUE_TEXT:"CUE_EXT",BAD_CUE:"BAD_CUE",BAD_WEBVTT:"BAD_WEBVTT"},Yo="Malformed WebVTT signature.",Tp=()=>typeof VTTCue<"u"?new VTTCue(0,0,""):Ko(),kp=()=>typeof VTTRegion<"u"?new VTTRegion:Xo(),Ap=class{constructor(e={}){this.regionSettings=null,this.cue=null;let t=e.useDomTypes??!0;this.createCue=e.createCue||t?Tp:Ko,this.createRegion=e.createRegion||t?kp:Xo,this.state=Y.INITIAL,this.buffer="",this.style="",this.regionList=[]}parse(e,t=!1){e&&(this.buffer+=e);let i=()=>{let r=this.buffer,a=0;for(;a<r.length&&r[a]!=="\r"&&r[a]!==`
652`;)++a;let l=r.substr(0,a);return r[a]==="\r"&&++a,r[a]===`
653`&&++a,this.buffer=r.substr(a),l},n=r=>{let a=new Fi;Bi(r,(l,u)=>{switch(l){case"MPEGT":a.integer(l+"S",u);break;case"LOCA":a.set(l+"L",Qo(u));break}},/[^\d]:/,/,/),this.ontimestampmap?.({MPEGTS:a.get("MPEGTS"),LOCAL:a.get("LOCAL")})},s=r=>{r.match(/X-TIMESTAMP-MAP/)&&Bi(r,(a,l)=>{a==="X-TIMESTAMP-MAP"&&n(l)},/=/)};try{let r;if(this.state===Y.INITIAL){if(!/\r\n|\n/.test(this.buffer))return this;r=i(),r.charCodeAt(0)===65279&&(r=r.slice(1));let u=r.match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new di(Yo);this.state=Y.HEADER}let a=!1,l=t;for(t||(this.cue=null,this.regionSettings=null);this.buffer;){if(!/\r\n|\n/.test(this.buffer))return this;switch(a?a=!1:r=i(),this.state){case Y.HEADER:/:/.test(r)?s(r):r||(this.state=Y.BLOCKS);continue;case Y.REGION:if(!r&&this.regionSettings){let c=this.createRegion();c.id=this.regionSettings.get("id",""),c.width=this.regionSettings.get("width",100),c.lines=this.regionSettings.get("lines",3),c.regionAnchorX=this.regionSettings.get("regionanchorX",0),c.regionAnchorY=this.regionSettings.get("regionanchorY",100),c.viewportAnchorX=this.regionSettings.get("viewportanchorX",0),c.viewportAnchorY=this.regionSettings.get("viewportanchorY",100),c.scroll=this.regionSettings.get("scroll",""),this.onregion?.(c),this.regionList.push(c),this.regionSettings=null,this.state=Y.BLOCKS;break}this.regionSettings===null&&(this.regionSettings=new Fi);let u=this.regionSettings;Bi(r,(c,d)=>{switch(c){case"id":u.set(c,d);break;case"width":u.percent(c,d);break;case"lines":u.integer(c,d);break;case"regionanchor":case"viewportanchor":let h=d.split(",");if(h.length!==2)break;let f=new Fi;if(f.percent("x",h[0]),f.percent("y",h[1]),!f.has("x")||!f.has("y"))break;u.set(c+"X",f.get("x")),u.set(c+"Y",f.get("y"));break;case"scroll":u.alt(c,d,["up"]);break}},/:/,/\s/);continue;case Y.STYLE:if(!r){this.onstyle?.(this.style),this.style="",this.state=Y.BLOCKS;break}this.style+=r+`
654`;continue;case Y.NOTE:r||(this.state=Y.ID);continue;case Y.BLOCKS:if(!r)continue;if(/^NOTE($[ \t])/.test(r)){this.state=Y.NOTE;break}if(/^REGION/.test(r)&&!l){this.state=Y.REGION;break}if(/^STYLE/.test(r)&&!l){this.state=Y.STYLE;break}this.state=Y.ID;case Y.ID:if(/^NOTE($|[ \t])/.test(r)){this.state=Y.NOTE;break}if(!r)continue;if(l=!0,this.cue=this.createCue(),this.cue.text??="",this.state=Y.CUE,r.indexOf("-->")===-1){this.cue.id=r;continue}case Y.CUE:try{Sp(r,this.cue,this.regionList)}catch(c){this.reportOrThrowError(c),this.cue=null,this.state=Y.BAD_CUE;continue}this.state=Y.CUE_TEXT;continue;case Y.CUE_TEXT:let o=r.indexOf("-->")!==-1;if(!r||o&&(a=!0)){this.oncue?.(this.cue),this.cue=null,this.state=Y.ID;continue}this.cue?.text&&(this.cue.text+=`
655`),this.cue.text+=r.replace(/\u2028/g,`
656`).replace(/u2029/g,`
657`);continue;case Y.BAD_CUE:r||(this.state=Y.ID);continue}}}catch(r){this.reportOrThrowError(r),this.state===Y.CUE_TEXT&&this.cue&&this.oncue&&this.oncue
657(this.cue),this.cue=null,this.regionSettings=null,this.state=this.state===Y.INITIAL?Y.BAD_WEBVTT:Y.BAD_CUE}return this}flush(){try{if(this.buffer+="",(this.cue||this.state===Y.HEADER)&&(this.buffer+=`
658
659`,this.parse(void 0,!0)),this.state===Y.INITIAL)throw new di(Yo)}catch(e){this.reportOrThrowError(e)}return this.onflush?.(),this}reportOrThrowError(e){if(e instanceof di)this.onparsingerror?.(e);else throw e}};async function qi(e,t){let i=new Ap(t),n=[],s=[],r=[],a=[];return i.oncue=l=>n.push(l),i.onregion=l=>s.push(l),i.onstyle=l=>r.push(l),i.onparsingerror=l=>a.push(l),i.parse(e),i.flush(),{cues:n,regions:s,styles:r,errors:a}}var Wi=(function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(n,s){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s)},t.off=function(n,s){if(!this.listeners[n])return!1;var r=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(r,1),r>-1},t.trigger=function(n){var s=this.listeners[n];if(s)if(arguments.length===2)for(var r=s.length,a=0;a<r;++a)s[a].call(this,arguments[1]);else for(var l=Array.prototype.slice.call(arguments,1),u=s.length,o=0;o<u;++o)s[o].apply(this,l)}
659,t.dispose=function(){this.listeners={}},t.pipe=function(n){this.on("data",function(s){n.push(s)})},e})();function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},ht.apply(null,arguments)}var Ds=op(Jo()),Cp=function(t){return Ds.default.atob?Ds.default.atob(t):Buffer.from(t,"base64").toString("binary")};function Hs(e){for(var t=Cp(e),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}var Bs=class extends Wi{constructor(){super(),this.buffer=""}push(t){let i;for(this.buffer+=t,i=this.buffer.indexOf(`
660`);i>-1;i=this.buffer.indexOf(`
661`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}},Ip="	",Vs=function(e){let t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},Lp=function(){let i="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+i+")")},pe=function(e){let t={};if(!e)return t;let i=e.split(Lp()),n=i.length,s;for(;n--;)i[n]!==""&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),t[s[0]]=s[1]);return t},el=e=>{let t=e.split("x"),i={};return t[0]&&(i.width=parseInt(t[0],10)),t[1]&&(i.height=parseInt(t[1],10)),i},Fs=class extends Wi{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(t){let i,n;if(t=t.trim(),t.length===0)return;if(t[0]!=="#"){this.trigger("data",{type:"uri",uri:t});return}this.tagMappers.reduce((r,a)=>{let l=a(t);return l===t?r:r.concat([l])},[t]).forEach(r=>{for(let a=0;a<this.customParsers.length;a++)if(this.customParsers[a].call(this,r))return;if(r.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:r.slice(1)});return}if(r=r.replace("\r",""),i=/^#EXTM3U/.exec(r),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(r),i){n={type:"tag",tagType:"inf"},i[1]&&(n.duration=parseFloat(i[1])),i[2]&&(n.title=i[2]),this.trigger("data",n);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(r),i){n={type:"tag",tagType:"targetduration"},i[1]&&(n.duration=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(r),i){n={type:"tag",tagType:"version"},i[1]&&(n.version=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(r),i){n={type:"tag",tagType:"media-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(r),i){n={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(r),i){n={type:"tag",tagType:"playlist-type"},i[1]&&(n.playlistType=i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(r),i){n=ht(Vs(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(r),i){n={type:"tag",tagType:"allow-cache"},i[1]&&(n.allowed=!/NO/.test(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(r),i){if(n={type:"tag",tagType:"map"},i[1]){let a=pe(i[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=Vs(a.BYTERANGE))}this.trigger("data",n);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(r),i){n={type:"tag",tagType:"stream-inf"},i[1]&&(n.attributes=pe(i[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=el(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(r),i){n={type:"tag",tagType:"media"},i[1]&&(n.attributes=pe(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-ENDLIST/.exec(r),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(r),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(r),i){n={type:"tag",tagType:"program-date-time"}
vendor: 4,324 bytes, line 661
661,i[1]&&(n.dateTimeString=i[1],n.dateTimeObject=new Date(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(r),i){n={type:"tag",tagType:"key"},i[1]&&(n.attributes=pe(i[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),this.trigger("data",n);return}if(i=/^#EXT-X-START:(.*)$/.exec(r),i){n={type:"tag",tagType:"start"},i[1]&&(n.attributes=pe(i[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(r),i){n={type:"tag",tagType:"cue-out-cont"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(r),i){n={type:"tag",tagType:"cue-out"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(r),i){n={type:"tag",tagType:"cue-in"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"skip"},n.attributes=pe(i[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(Ip)),this.trigger("data",n);return}if(i=/^#EXT-X-PART:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"part"},n.attributes=pe(i[1]),["DURATION"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]))}),["INDEPENDENT","GAP"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=/YES/.test(n.attributes[a]))}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=Vs(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"server-control"},n.attributes=pe(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=/YES/.test(n.attributes[a]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"part-inf"},n.attributes=pe(i[1]),["PART-TARGET"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseFloat(n.attributes[a]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=pe(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(a){if(n.attributes.hasOwnProperty(a)){n.attributes[a]=parseInt(n.attributes[a],10);let l=a==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[l]=n.attributes[a],delete n.attributes[a]}}),this.trigger("data",n);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=pe(i[1]),["LAST-MSN","LAST-PART"].forEach(function(a){n.attributes.hasOwnProperty(a)&&(n.attributes[a]=parseInt(n.attributes[a],10))}),this.trigger("data",n);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(r),i&&i[1]){n={type:"tag",tagType:"daterange"},n.attributes=pe(i[1]),["ID","CLASS"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=String(n.attributes[l]))}),["START-DATE","END-DATE"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=new Date(n.attributes[l]))}),["DURATION","PLANNED-DURATION"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=parseFloat(n.attributes[l]))}),["END-ON-NEXT"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=/YES/i.test(n.attributes[l]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=n.attributes[l].toString(16))});let a=/^X-([A-Z]+-)+[A-Z]+$/;
661for(let l in n.attributes){if(!a.test(l))continue;let u=/[0-9A-Fa-f]{6}/g.test(n.attributes[l]),o=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=u?n.attributes[l].toString(16):o?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(r),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(r),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(r),i){n={type:"tag",tagType:"content-steering"},n.attributes=pe(i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(r),i){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=pe(i[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=el(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(r),i){n={type:"tag",tagType:"define"},n.attributes=pe(i[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:r.slice(4)})})}addParser({expression:t,customType:i,dataParser:n,segment:s}){typeof n!="function"&&(n=r=>r),this.customParsers.push(r=>{if(t.exec(r))return this.trigger("data",{type:"custom",data:n(r),customType:i,segment:s}),!0})}addTagMapper({expression:t,map:i}){let n=s=>t.test(s)?i(s):s;this.tagMappers.push(n)}},Pp=e=>e.toLowerCase().replace(/-(\w)/g,t=>t[1].toUpperCase()),Xe=function(e){let t={};return Object.keys(e).forEach(function(i){t[Pp(i)]=e[i]}),t},Us=function(e){let{serverControl:t,targetDuration:i,partTargetDuration:n}=e;if(!t)return;let s="#EXT-X-SERVER-CONTROL",r="holdBack",a="partHoldBack",l=i&&i*3,u=n&&n*2;i&&!t.hasOwnProperty(r)&&(t[r]=l,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${l}).`})),l&&t[r]<l&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${t[r]}) to targetDuration * 3 (${l})`}),t[r]=l),n&&!t.hasOwnProperty(a)&&(t[a]=n*3,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[a]}).`})),n&&t[a]<u&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${t[a]}) to partTargetDuration * 2 (${u}).`}),t[a]=u)},$i=class extends Wi{constructor(t={}){super(),this.lineStream=new Bs,this.parseStream=new Fs,this.lineStream.pipe(this.parseStream),this.mainDefinitions=t.mainDefinitions||{},this.params=new URL(t.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;let i=this,n=[],s={},r,a,l=!1,u=function(){},o={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",d=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let h=0,f=0,g={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&r&&(s.map=r),!s.key&&a&&(s.key=a),!s.timeline&&typeof d=="number"&&(s.timeline=d),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(p){let y,m;if(i.manifest.definitions){for(let b in i.manifest.definitions)if(p.uri&&(p.uri=p.uri.replace(`{$${b}}`,i.manifest.definitions[b])),p.attributes)for(let v in p.attributes)typeof p.attributes[v]=="string"&&(p.attributes[v]=p.attributes[v].replace(`{$${b}}`,i.manifest.definitions[b]))}({tag(){({version(){p.version&&(this.manifest.version=p.version)},"allow-cache"(){this.manifest.allowCache=p.allowed,"allowed"in p||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){let b={};"length"in p&&(s.byterange=b,b.length=p.length,"offset"in p||(p.offset=h)),"offset"in p&&(s.byterange=b,b.offset=p.offset),h=b.offset+b.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),p.title&&(s.title=p.title),p.duration>0&&(s.duration=p.duration),p.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!p.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(p.attributes.METHOD==="NONE"){a=null;return}if(!p.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(p.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:p.attributes};return}if(p.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:p.attributes.URI};return}if(p.attributes.KEYFORMAT===c){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(p.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(p.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),p.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(p.attributes.KEYID&&p.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:p.attributes.KEYFORMAT,keyId:p.attributes.KEYID.substring(2)},pssh:Hs(p.attributes.URI.split(",")[1])};return}p.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),a={method:p.attributes.METHOD||"AES-128",uri:p.attributes.URI},typeof p.attributes.IV<"u"&&(a.iv=p.attributes.IV)},"media-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+p.number});return}this.manifest.mediaSequence=p.number},"discontinuity-sequence"(){if(!isFinite(p.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+p.number});return}this.manifest.discontinuitySequence=p.number,d=p.number},"playlist-type"(){if(!/VOD|EVENT/.test(p.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+p.playlist});return}this.manifest.playlistType=p.playlistType},map(){r={},p.uri&&(r.uri=p.uri),p.byterange&&(r.byterange=p.byterange),a&&(r.key=a)}
661,"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||o,!p.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),ht(s.attributes,p.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||o,!(p.attributes&&p.attributes.TYPE&&p.attributes["GROUP-ID"]&&p.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let b=this.manifest.mediaGroups[p.attributes.TYPE];b[p.attributes["GROUP-ID"]]=b[p.attributes["GROUP-ID"]]||{},y=b[p.attributes["GROUP-ID"]],m={default:/yes/i.test(p.attributes.DEFAULT)},m.default?m.autoselect=!0:m.autoselect=/yes/i.test(p.attributes.AUTOSELECT),p.attributes.LANGUAGE&&(m.language=p.attributes.LANGUAGE),p.attributes.URI&&(m.uri=p.attributes.URI),p.attributes["INSTREAM-ID"]&&(m.instreamId=p.attributes["INSTREAM-ID"]),p.attributes.CHARACTERISTICS&&(m.characteristics=p.attributes.CHARACTERISTICS),p.attributes.FORCED&&(m.forced=/yes/i.test(p.attributes.FORCED)),y[p.attributes.NAME]=m},discontinuity(){d+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=p.dateTimeString,this.manifest.dateTimeObject=p.dateTimeObject),s.dateTimeString=p.dateTimeString,s.dateTimeObject=p.dateTimeObject;let{lastProgramDateTime:b}=this;this.lastProgramDateTime=new Date(p.dateTimeString).getTime(),b===null&&this.manifest.segments.reduceRight((v,T)=>(T.programDateTime=v-T.duration*1e3,T.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(p.duration)||p.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+p.duration});return}this.manifest.targetDuration=p.duration,Us.call(this,this.manifest)},start(){if(!p.attributes||isNaN(p.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:p.attributes["TIME-OFFSET"],precise:p.attributes.PRECISE}},"cue-out"(){s.cueOut=p.data},"cue-out-cont"(){s.cueOutCont=p.data},"cue-in"(){s.cueIn=p.data},skip(){this.manifest.skip=Xe(p.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",p.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;let b=this.manifest.segments.length,v=Xe(p.attributes);s.parts=s.parts||[],s.parts.push(v),v.byterange&&(v.byterange.hasOwnProperty("offset")||(v.byterange.offset=f),f=v.byterange.offset+v.byterange.length);let T=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${T} for segment #${b}`,p.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((L,M)=>{L.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${M} lacks required attribute(s): LAST-PART`})})},"server-control"(){let b=this.manifest.serverControl=Xe(p.attributes);b.hasOwnProperty("canBlockReload")||(b.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Us.call(this,this.manifest),b.canSkipDateranges&&!b.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){let b=this.manifest.segments.length,v=Xe(p.attributes),T=v.type&&v.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(v),v.byterange&&(v.byterange.hasOwnProperty("offset")||(v.byterange.offset=T?f:0,T&&(f=v.byterange.offset+v.byterange.length)));let L=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${L} for segment #${b}`,p.attributes,["TYPE","URI"]),!!v.type)for(let M=0;M<s.preloadHints.length-1;M++){let D=s.preloadHints[M];D.type&&D.type===v.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${L} for segment #${b} has the same TYPE ${v.type} as preload hint #${M}`})}},"rendition-report"(){let b=Xe(p.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(b);let v=this.manifest.renditionReports.length-1,T=["LAST-MSN","URI"];l&&T.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${v}`,p.attributes,T)},"part-inf"(){this.manifest.partInf=Xe(p.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",p.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Us.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Xe(p.attributes));let b=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${b}`,p.attributes,["ID","START-DATE"]);let v=this.manifest.dateRanges[b];
vendor: 4,331 bytes, lines 661-662
661v.endDate&&v.startDate&&new Date(v.endDate)<new Date(v.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),v.duration&&v.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),v.plannedDuration&&v.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});let T=!!v.endOnNext;if(T&&!v.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),T&&(v.duration||v.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),v.duration&&v.endDate){let M=v.startDate.getTime()+v.duration*1e3;this.manifest.dateRanges[b].endDate=new Date(M)}if(!g[v.id])g[v.id]=v;else{for(let M in g[v.id])if(v[M]&&JSON.stringify(g[v.id][M])!==JSON.stringify(v[M])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}let L=this.manifest.dateRanges.findIndex(M=>M.id===v.id);this.manifest.dateRanges[L]=ht(this.manifest.dateRanges[L],v),g[v.id]=ht(g[v.id],v),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=Xe(p.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",p.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};let b=(v,T)=>{if(v in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${v}`});return}this.manifest.definitions[v]=T};if("QUERYPARAM"in p.attributes){if("NAME"in p.attributes||"IMPORT"in p.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}let v=this.params.get(p.attributes.QUERYPARAM);if(!v){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${p.attributes.QUERYPARAM}`});return}b(p.attributes.QUERYPARAM,decodeURIComponent(v));return}if("NAME"in p.attributes){if("IMPORT"in p.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in p.attributes)||typeof p.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${p.attributes.NAME}`});return}b(p.attributes.NAME,p.attributes.VALUE);return}if("IMPORT"in p.attributes){if(!this.mainDefinitions[p.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${p.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}b(p.attributes.IMPORT,this.mainDefinitions[p.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:p.attributes,uri:p.uri,timeline:d}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",p.attributes,["BANDWIDTH","URI"])}}[p.tagType]||u).call(i)},uri(){s.uri=p.uri,n.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),a&&(s.key=a),s.timeline=d,r&&(s.map=r),f=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){p.segment?(s.custom=s.custom||{},s.custom[p.customType]=p.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[p.customType]=p.data)}})[p.type].call(i)})}requiredCompatibilityversion(t,i){(t<i||!t)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(t,i,n){let s=[];n.forEach(function(r){i.hasOwnProperty(r)||s.push(r)}),s.length&&this.trigger("warn",{message:`${t} lacks required attribute(s): ${s.join(", ")}`})}push(t){this.lineStream.push(t)}end(){this.lineStream.push(`
662`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(t){this.parseStream.addParser(t)}addTagMapper(t){this.parseStream.addTagMapper(t)}};var tl=(e,t)=>
662Number.isFinite(e)&&e>0?e:t,zi={Opener:"opener",Closer:"closer",Bumper:"bumper",Commercial:"commercial",ContentFrame:"contentframe",Overlay:"overlay",Sponsored:"sponsored",Unknown:"unknown"},E={...zo},al=Symbol.for("internal_FoundationError");var fi=e=>!!e&&typeof e=="object"&&"_type"in e&&e._type===al,js=class extends Error{constructor(e,t={}){super(e),this._type=al,this.code=t.code||E.ERROR_NOT_TREATED_59000.code,this.context={message:t.message,...t.context}}},w=(e,t,i)=>{let n=i?.message||e;return new js(n,{code:i?.code||E.ERROR_NOT_TREATED_59000.code,context:t,message:e})},se={Dash:"dash",Hls:"hls",Progressive:"progressive"},me={Widevine:"widevine",Playready:"playready",Fairplay:"fairplay"};var Gs={Vtt:"vtt",Audiorella:"audiorella"},k={Mobile:"mobile",Tablet:"tablet",Desktop:"desktop",Webos_3:"webos-3",Webos_4:"webos-4",Webos_5:"webos-5",Webos_6:"webos-6",Webos_22:"webos-22",Webos_23:"webos-23",Webos_24:"webos-24",Webos_25:"webos-25",Tizen_3_0:"tizen-3.0",Tizen_4_0:"tizen-4.0",Tizen_5_0:"tizen-5.0",Tizen_5_5:"tizen-5.5",Tizen_6_0:"tizen-6.0",Tizen_6_5:"tizen-6.5",Tizen_7_0:"tizen-7.0",Tizen_8_0:"tizen-8.0",Tizen_9_0:"tizen-9.0",Tizen_10_0:"tizen-10.0",Skyq:"skyq",Skyxione:"skyxione",Skystream:"skystream",Magenta_G4:"magenta-g4",Magenta_G5:"magenta-g5",Vodafone_Gtv:"vodafone-gtv",Vodafone_Vtv:"vodafone-vtv",Chromecast:"chromecast",Telecolumbus:"telecolumbus",Kepler:"kepler",Vega:"vega",Hisense:"hisense"};var Xi={Prod:"prod",Preprod:"preprod",Dev:"dev"},W={Vod:"vod",Live:"live",Event:"event",Fast:"fast",Text_To_Speech:"text-to-speech",Podcast:"podcast",Audiobook:"audiobook",Radio:"radio",Advertisement:"advertisement"},Mt="*",fe={None:0,Error:10,Warn:20,Info:30,Debug:40,Trace:50};function ne(){if(!(typeof window>"u"))return window}function Yi(){if(!(typeof document>"u"))return document}function Ys(){if(!(typeof navigator>"u"))return navigator}function tn(){if(!(typeof location>"u"))return location}function ol(e){if(typeof window>"u")return!1;let t=window;return e in t&&t[e]!==void 0}function Le(e){if(typeof document>"u")return!1;let t=document;return e in t&&t[e]!==void 0}function $s(e){if(typeof navigator>"u")return!1;let t=navigator;return e in t&&t[e]!==void 0}var re=e=>{if(!e)throw w("Cannot return a logger for an empty namespace.");let t=ne()?.foundation?.internal_RootLogger;if(!t)throw w("Logger on the window object wasn't initialized yet when getLogger() was called");return t.getLogger(e)},ll=class{constructor(e){this.observers=new Set,this.valuesChangeSubscriptions=new Set,this.onValuesChange=(t,i)=>{let n={keys:t,previousValues:Object.fromEntries(t.map(s=>[s,this._value[s]])),observer:i};return this.valuesChangeSubscriptions.add(n),i(this._value,{...n.previousValues}),()=>this.valuesChangeSubscriptions.delete(n)},this.onValueChange=(t,i)=>this.onValuesChange([t],(n,s)=>{i(n,s[t])}),this.once=(t,i)=>{if(t(this._value))return i(this._value),()=>{};let s=this.subscribe(r=>{t(r)&&(i(r),s())});return s},this._value=e}subscribe(e){return this.observers.add(e),e(this._value),()=>this.unsubscribe(e)}unsubscribe(e){this.observers.delete(e)}get(){return this._value}get value(){return this.get()}valueOf(){return this.get()}update(e){this._value=e;for(let t of this.observers)t(e);for(let t of this.valuesChangeSubscriptions){let i=t.keys.filter(s=>this._value[s]!==t.previousValues[s]);if(i.length===0)continue;let n={...t.previousValues};for(let s of i)t.previousValues[s]=this._value[s];t.observer(this._value,n)}}patch(e){this.update({...this._value,...e})}silentPatch(e){this._value={...this._value,...e};for(let t of this.valuesChangeSubscriptions)for(let i of t.keys)t.previousValues[i]=this._value[i]}};function nn(){let e,t,i=new Promise((n,s)=>{e=n,t=s});return{resolve:e,reject:t,promise:i}}async function Ks(e,t){let i=!0,n,{timeout:s,rejectError:r,trackVisibility:a}=t,l=Le("addEventListener")&&Le("removeEventListener")&&a,{resolve:u,promise:o}=nn(),c=r||w(`The operation did not finish within ${Math.floor(s/1e3)} seconds`),d=()=>{n=void 0,i&&u(c)},h=()=>{n&&(clearTimeout(n),n=void 0)},f=()=>{h(),n=setTimeout(d,s)},g=()=>{if(document.hidden){h();return}n||f()};return l?(g(),document.addEventListener("visibilitychange",g)):f(),Promise.race([...e,o]).then(p=>(i=!1,h(),l&&document.removeEventListener("visibilitychange",g),p))}async function Xs(e,t){return Ks(e,t).then(i=>{if(fi(i))throw i;return i})}function cl(e,t){let i=t;return n=>{i!==n&&(i=n,e(n))}}function Nt(e){return(t,i)=>new Promise(n=>{let s=r=>{i&&!i(r)||(e.removeEventListener(t,s),n(r))};e.addEventListener(t,s)})}function Rp(e,t){let i=re("autoplay.assertVideoElementAttributes");xp(e,i),_p(e),Mp(e,t===void 0?!1:t)}
662function xp(e,t){let i=["loop","autoplay","preload","muted","controls"],n=[];for(let s of i)e.hasAttribute(s)&&(n.push(s),e.removeAttribute(s));n.length>0&&t.warn("The following attributes are not supported on the <video> element and have been removed",n.join(", "))}function _p(e){e.playsInline=!0}function Mp(e,t){t?(e.removeAttribute("x-webkit-airplay"),e.disableRemotePlayback=!1):(e.setAttribute("x-webkit-airplay","deny"),e.disableRemotePlayback=!0)}function Np(){return new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"})}function Op(){return new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,4,237,109,100,97,116,255,251,144,100,0,15,240,0,0,105,0,0,0,8,0,0,13,32,0,0,1,0,0,1,164,0,0,0,32,0,0,52,128,0,0,4,76,65,77,69,51,46,49,48,48,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,76,65,77,69,51,46,49,48,48,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,255,251,146,100,64,143,240,0,0,105,0,0,0,8,0,0,13,32,0,0,1,0,0,1,164,0,0,0,32,0,0,52,128,0,0,4,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,76,65,77,69,51,46,49,48,48,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,255,251,146,100,64,143,240,0,0,105,0,0,0,8,0,0,13,32,0,0,1,0,0,1,164,0,0,0,32,0,0,52,128,0,0,4,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,0,0,2,218,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,5,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,46,0,0,4,81,0,1,0,0,0,0,1,125,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,12,81,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,40,109,105,110,
662102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,236,115,116,98,108,0,0,0,116,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,100,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,44,101,115,100,115,0,0,0,0,3,128,128,128,27,0,1,0,4,128,128,128,13,107,21,0,0,0,0,2,35,170,0,2,35,170,6,128,128,128,1,2,0,0,0,20,98,116,114,116,0,0,0,0,0,2,35,170,0,2,35,170,0,0,0,32,115,116,116,115,0,0,0,0,0,0,0,2,0,0,0,2,0,0,4,128,0,0,0,1,0,0,3,81,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,32,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,161,0,0,1,162,0,0,1,162,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,97,117,100,116,97,0,0,0,89,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,44,105,108,115,116,0,0,0,36,169,116,111,111,0,0,0,28,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,54,49,46,55,46,49,48,48])],{type:"video/mp4"})}async function Dp(e,t={}){let i=t.isMuted??!1,n=t.hasAacCodecSupport??!0,s=t.timeoutInMilliseconds??250,r=re("autoplay.testAutoplay");if(t.mustCheckUserActivation&&!i){let g=Ys()?.userActivation;if(!g)return r.debug("navigator.userActivation is not supported, skipping autoplay test"),{result:!1};if(!g.isActive)return r.debug("No active user activation, skipping autoplay test"),{result:!1}}r.trace("Test autoplay support",{isMuted:i});let a=e.muted;r.trace("Video element muted value was",a),e.muted=i,e.autoplay=!0,r.debug("Test autoplay support with autoplay and muted value",{autoplay:!0,muted:i});let l=n?Np():Op(),u=URL.createObjectURL(l);e.src=u,e.load();let o,c,d,h=await new Promise(f=>{o=e.play(),c=setTimeout(()=>{d(!1,new Error(`Timeout ${s}ms has been reached`))},s),d=(g,p=null)=>{e.src="",URL.revokeObjectURL(u),clearTimeout(c),f({result:g,error:p})},o!==void 0?o.then(()=>d(!0)).catch(g=>d(!1,g)):d(!0)});
662return r.debug("Autoplay support result",h),e.autoplay=!1,e.muted=a,r.debug("Reset video element autoplay and muted value",{autoplay:!1,muted:a}),h}var Hp=["@foundation-player/player-dashjs","@foundation-player/player-chromecast","@foundation-player/plugin-smartclip","@foundation-player/plugin-npaw","@foundation-player/plugin-ui","@foundation-player/plugin-shorts","@foundation-player/plugin-yospace","@foundation-player/plugin-vast4"];function Vp(e){return Hp.map(t=>e[t]?"1":"0").join("")}function sn(e){return e.querySelector("video")||e.shadowRoot?.querySelector("video")||void 0}var J=()=>jo(),Qs=()=>J().getUA().includes("Sky, ES160"),rn=()=>{let e=J().getUA();return["SKXI11AEISODE"].some(t=>e.includes(t))},gi=()=>{let e=J().getUA();return["Sky, XiOne","Sky, ES340","SKXI11AIS"].some(t=>e.includes(t))},an=()=>Qs()||gi()||rn(),ft=()=>{let e=J().getUA();return e.includes("AFTCA002")||e.includes("Kepler")},on=()=>ft()?"Vega":J().getOS().name??"",gt=()=>["tizen"].includes(on().toLocaleLowerCase()),ln=()=>J().getUA().includes("Vodafone_Germany_GigaTV_4k_Box"),cn=()=>J().getUA().includes("VODAFONE_STB"),ul=()=>ln()||cn(),mi=()=>on().toLocaleLowerCase().includes("webos"),un=()=>
662{if(gt())return"Chrome";let e=J().getBrowser().name||"";return gi()||rn()||e==="Safari"&&(ul()||an()||mi())?"WebKit":e||""},dl=()=>gt()?"":gi()||rn()?J().getUA().match(/Version\/(\d*(?:.\d*)?)/)?.[1]||"":J().getBrowser().version||"",dn=()=>{let e=J().getUA();return e.includes("Hisense")||e.includes("VIDAA")||e.includes("Odin/")},Zs=()=>{let e=J().getUA();return["DT,MR601SAT","DT,MR401","DT,MR201"].some(t=>e.includes(t))},Js=()=>J().getUA().includes("DT,MRG5"),er=()=>{let t=J().getDevice().model;if(t)return t;switch(!0){case Qs():return"Q";case gi():return"XiOne";case rn():return"Stream";case Zs():return"G4";case Js():return"G5";case ln():return"GTV";case cn():return"VTV";case gt():case mi():case dn():return"TV";case ft():return"Vega";default:return""}},tr=()=>Zs()||Js()?!0:J().getUA().includes("DT_STB_BCM72"),Up=()=>un().toLocaleLowerCase().includes("samsung internet"),hn=()=>J().getUA().includes("TeleColumbus"),Bp=()=>{let t=J().getDevice().vendor;if(t)return t;switch(!0){case Up():case gt():return"Samsung";case hn():return"TeleColumbus";case mi():return"LG";case an():return"Sky";case tr():return"Telekom";case ln():case cn():return"Vodafone";case ft():return"Amazon";case dn():return"Hisense";default:return""}},hl=()=>{if(hn())return"";if(ft()){let i=/; Kepler ([\d.]*);/.exec(J().getUA());return i?i[1]:""}let e=J().getOS().version||"";return e.startsWith("armv7")?"":e},pl=()=>on().toLocaleLowerCase().includes("android")||!1,ir=()=>ol("cast")?!0:J().getUA().includes("CrKey"),Fp=()=>un().toLocaleLowerCase().includes("edge"),fl=()=>er().toLocaleLowerCase().includes("ipad")||!1,gl=()=>er().toLocaleLowerCase().includes("iphone")||!1,qp=()=>an()||hn()||tr()||ul()||ir()||ft(),Wp=()=>{let e=J();return mi()||gt()||dn()||qp()||ir()||e.getDevice().type==="smarttv"},$p=()=>ft()?!1:J().getDevice().type==="mobile",ml=()=>Wp()?!1:un().toLocaleLowerCase().includes("safari"),zp=()=>J().getDevice().type==="tablet"||fl(),jp=()=>gt()?!1:J().getEngine().name?.toLocaleLowerCase()==="webkit",bl=["com.microsoft.playready","com.microsoft.playready.recommendation"],yl=["com.widevine.alpha"],vl=["com.apple.fps.1_0","com.apple.fps"],nr=class{constructor(e,t){this.videoElement=e,this.logger=t,this.keySystems=["org.w3.clearkey",...yl,...bl,...vl,"com.adobe.primetime"],this.basicVideoCapabilities=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],this.basicConfig={initDataTypes:["cenc"],videoCapabilities:this.basicVideoCapabilities},this.offlineConfig={videoCapabilities:this.basicVideoCapabilities,persistentState:"required",sessionTypes:["persistent-license"]},this.configs=[this.offlineConfig,this.basicConfig]}static canDetectDRMSupport(e){return!1}async detectDRMSupport(){this.logger.debug("Test drm support with the following media key system configurations",this.configs);let e=await Promise.all(this.keySystems.map(async t=>{if(t==="org.w3.clearkey"&&ml())return this.logger.debug(`Disable "${t}" support for Safari`),[t,{supported:!1}];this.logger.debug(`Test access support for "${t}"`);let i=await this.checkKeySystem(t);return[t,i]}));return this.logger.debug("Detected drm support for",e.filter(([t,i])=>i.supported)),Object.fromEntries(e)}},Gp=class extends nr{static canDetectDRMSupport(e){return typeof navigator.requestMediaKeySystemAccess=="function"}async checkKeySystem(e){let t;try{this.logger.debug(`Test access support for "${e}"`);let i=await navigator.requestMediaKeySystemAccess(e,this.configs),n=i.getConfiguration().sessionTypes,s=n?n.includes("persistent-license"):!1;this.logger.debug(`Set preliminary support for "${e}"`),t={supported:!0,persistentState:s},this.logger.debug(`Create media keys for "${e}"`),await i.createMediaKeys()}catch(i){t={supported:!1},this.logger.debug(`Disable support for "${e}"`,i)}return t}},Yp=class extends nr{static canDetectDRMSupport(e){return typeof window.MSMediaKeys<"u"}checkKeySystem(e){return{supported:window.MSMediaKeys?.isTypeSupported(e)||!1}}},Kp=class extends nr{static canDetectDRMSupport(e){return"webkitGenerateKeyRequest"in e&&typeof e.webkitGenerateKeyRequest=="function"}checkKeySystem(e){return{supported:!!this.videoElement.canPlayType("video/mp4",e)}}};function Xp(e){let t=re("capability.drmProbe"),n=[Gp,Yp,Kp].find(r=>r.canDetectDRMSupport(e));return n?new n(e,t).detectDRMSupport():(t.warn("No support for checking DRM found"),Promise.resolve({}))}
662var El=["application/dash+xml"],wl=["application/x-mpegurl","application/vnd.apple.mpegurl"];function Qp(e){let t=re("capability.manifestProbe"),i=[...El,...wl,"application/vnd.ms-sstr+xml"],n={};for(let s of i){let r=e.canPlayType(s);n[s]=!!r,t.trace(`Test native manifest support for "${s}"`,{mimeType:s,supported:r||!1})}return n}function Zp(e){let t=re("capability.mediaProbe"),i=['video/mp4; codecs="avc1.42E01E"','video/mp4; codecs="avc3.42E01E"','video/mp4; codecs="hev1.1.6.L93.90"','video/mp4; codecs="hvc1.1.6.L93.90"','video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084"','video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084"','video/mp4; codecs="vp9"','video/mp4; codecs="vp09.00.10.08"','video/mp4; codecs="av01.0.01M.08"','audio/mp4; codecs="mp4a.40.2"','audio/mp4; codecs="ac-3"','audio/mp4; codecs="ec-3"','audio/mp4; codecs="opus"','audio/mp4; codecs="flac"','audio/mp4; codecs="dtsc"','audio/mp4; codecs="dtse"','audio/mp4; codecs="dtsx"','video/webm; codecs="vp8"','video/webm; codecs="vp9"','video/webm; codecs="vp09.00.10.08"','audio/webm; codecs="vorbis"','audio/webm; codecs="opus"','video/mp2t; codecs="avc1.42E01E"','video/mp2t; codecs="avc3.42E01E"','video/mp2t; codecs="hvc1.1.6.L93.90"','video/mp2t; codecs="mp4a.40.2"','video/mp2t; codecs="ac-3"','video/mp2t; codecs="ec-3"',"text/vtt",'application/mp4; codecs="wvtt"',"application/ttml+xml",'application/mp4; codecs="stpp"',"audio/aac","audio/ac3","audio/ec3","audio/mpeg"],n={};for(let s of i){let r=e.canPlayType(s);n[s]=!!r,t.debug(`Test native media type support for "${s}"`,{mimeType:s,supported:r||!1})}return n}async function Jp(e,t,i){if(t===k.Chromecast)return ef();if(t===k.Vega)return tf();if(!Yi()||!Ys()||!ne())return{capabilities:{manifestTypes:[],keySystems:[]},manifest:{},media:{},drm:{}};let n=sn(e)||document.createElement("video"),s=re("capability.detectClientSupport"),r=Qp(n),a=Zp(n),l=await Xp(n),u={manifestTypes:[se.Progressive],keySystems:[]},o=El.filter(m=>r[m]);typeof MediaSource<"u"&&(s.debug("Add manifestType",{manifestType:se.Dash,nativeSupport:o}),u.manifestTypes.push(se.Dash));let c=wl.filter(m=>r[m]),d=un()==="Chrome",h=dl().split(".")[0]||"",f=i?.enableNativeHlsOnChromeBrowsers&&d&&Number(h)>=142;(jp()||f)&&c.length>0&&(u.manifestTypes.push(se.Hls),s.debug("Add manifestType",{manifestType:se.Hls,nativeSupport:c}));let g=bl.filter(m=>m in l&&l[m].supported);g.length>0&&(u.keySystems.push(me.Playready),s.debug("Add keySystem",{keySystem:me.Playready,drmSupport:g}));let p=yl.filter(m=>m in l&&l[m].supported);p.length>0&&(u.keySystems.push(me.Widevine),s.debug("Add keySystem",{keySystem:me.Widevine,drmSupport:p}));let y=vl.filter(m=>m in l&&l[m].supported);return y.length>0&&(u.keySystems.push(me.Fairplay),s.debug("Add keySystem",{keySystem:me.Fairplay,drmSupport:y})),{capabilities:u,manifest:r,media:a,drm:l}}function ef(){return{capabilities:{manifestTypes:[se.Progressive,se.Dash],keySystems:[me.Widevine]},manifest:{},media:{},drm:{}}}function tf(){return{capabilities:{manifestTypes:[se.Progressive,se.Dash],keySystems:[me.Widevine]},manifest:{},media:{},drm:{}}}var nf=class{constructor(e,t){this.providedLoadRequests=[],this.providedCreatePlayerOptions=e,this.providedLoadRequests.push(e.loadRequest),t&&this.registerToGlobal()}registerToGlobal(){let e=ne();e&&(e.foundation||={},e.foundation.internal_DebugInterfaces||=[],e.foundation.internal_DebugInterfaces.push(this))}},sf=()=>{if(Js())return k.Magenta_G5;if(Zs())return k.Magenta_G4;if(ln())return k.Vodafone_Gtv;if(cn())return k.Vodafone_Vtv;if(Qs())return k.Skyq;if(gi())return k.Skyxione;if(ir())return k.Chromecast;if(hn())return k.Telecolumbus;if(ft())return k.Vega;if(dn())return k.Hisense;let e=hl();if(gt())switch(e){case"3.0":return k.Tizen_3_0;case"4.0":return k.Tizen_4_0;case"5.0":return k.Tizen_5_0;case"5.5":return k.Tizen_5_5;case"6.0":return k.Tizen_6_0;case"6.5":return k.Tizen_6_5;case"7.0":return k.Tizen_7_0;case"8.0":return k.Tizen_8_0;case"9.0":return k.Tizen_9_0;case"10.0":return k.Tizen_10_0;default:return k.Tizen_3_0}let t=dl().split(".")[0];if(mi())switch(t){case"38":return k.Webos_3;case"53":return k.Webos_4;case"68":return k.Webos_5;case"79":return k.Webos_6;case"87":return k.Webos_22;case"94":return k.Webos_23;case"108":return k.Webos_24;case"120":return k.Webos_25;default:return k.Webos_3}return $p()?k.Mobile:zp()?k.Tablet:k.Desktop},il=4096,Ki=[],xt,Ie=0;for(;Ie<256;Ie++)Ki[Ie]=(Ie+256).toString(16).substring(1);Ie=0;var Sl=()=>{if(typeof crypto<"u"&&crypto.randomUUID&&typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto<"u"&&crypto.getRandomValues&&typeof crypto.getRandomValues=="function")(!xt||Ie+16>il)&&(xt=crypto.getRandomValues(new Uint8Array(il)),Ie=0);else{let i=256;if(!xt||Ie+16>256){for(xt=Array(i);i--;)xt[i]=256*Math.random()|0;
662Ie=0}}let e,t="";for(let i=0;i<16;i++)e=xt[Ie+i],i===6?t+=Ki[e&15|64]:i===8?t+=Ki[e&63|128]:t+=Ki[e],i&1&&i>1&&i<11&&(t+="-");return Ie+=16,t},Qi=e=>fi(e)?e:w("Non FoundationError occurred",{originalError:e});async function rf(e,t){let i=re("drm.fairplay");if(i.debug("Handling Fairplay DRM",{event:e,drmConfig:t}),!t)throw i.error("No DRM configuration provided",new Error,{drmConfig:t}),w("No DRM configuration provided",{},E.FALLBACK_DRM_ERROR_10000);let n=t.find(p=>p.keySystem===me.Fairplay);if(!n)throw w("No Fairplay configuration provided",{fairplayConfig:n},E.FALLBACK_DRM_ERROR_10000);if(!n.licenseServerUrl)throw w("No license server URL provided",{fairplayConfig:n},E.INVALID_MISSING_FAIRPLAY_CERTIFICATE_URL_13310);if(!n.certificateUrl)throw w("No certificate URL provided",{fairplayConfig:n},E.INVALID_MISSING_FAIRPLAY_CERTIFICATE_URL_13310);let{initDataType:s,initData:r}=e;if(!r)return i.debug("Returning Fairplay DRM config without initData",{fairplayConfig:n}),{drmConfig:n};let a=e.target;if(!a.mediaKeys&&(i.debug("Creating media keys for Fairplay DRM",{fairplayConfig:n}),await af(s,n.certificateUrl,a),!a.mediaKeys))throw w("Empty media keys after setMediaKeys",{},E.DRM_NOT_FULLY_IMPLEMENTED_32120);i.debug("Creating Fairplay session");let l=a.mediaKeys.createSession(),u=Nt(l)("message");i.debug("Generating Fairplay request"),await l.generateRequest(s,r);let o=1e4,c=await Xs([u],{timeout:o,rejectError:w(`Key request timed out after ${o/1e3} seconds`,{},E.INVALID_FAIRPLAY_CERTIFICATE_DATA_13320)});i.debug("Received Fairplay key message",{keyMessage:c});let d=btoa(nl(c.message));if(!d)throw w("spc string is empty",{},E.INVALID_FAIRPLAY_CERTIFICATE_DATA_13320);let f=new URL(nl(r)).searchParams.get("keyId");if(!f)throw w("keyId not found or empty",{},E.INVALID_FAIRPLAY_CERTIFICATE_DATA_13320);i.debug("Requesting Fairplay license from license server",{fairplayConfig:n,keyId:f});let g=await new Promise((p,y)=>{let m=new XMLHttpRequest;m.open("POST",n.licenseServerUrl),m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");let b=Object.entries(n.headers||{});for(let[v,T]of b)T&&m.setRequestHeader(v,T);m.onload=()=>{let v=m.status;if(v===0||v>=200&&v<400)p(of(m.response));else{let T=JSON.parse(m.response);y(new js(E.FALLBACK_DRM_ERROR_10000.message,{code:T.errorCode,context:{response:T,message:T.error}}))}},m.onabort=y,m.onerror=v=>{y(w("DRM Request has thrown an error",{originalError:v},E.FALLBACK_DRM_ERROR_10000))},m.send(`spc=${encodeURIComponent(d)}&keyId=${f}`)});return i.debug("Updating Fairplay session with license",{licenseServerResponse:g}),await l.update(g),i.trace("Fairplay session updated",{session:l,fairplayConfig:n}),{session:l,drmConfig:n}}async function af(e,t,i){let n=Ys();if(!n?.requestMediaKeySystemAccess)throw new Error("requestMediaKeySystemAccess is not available");let[s,r]=await Promise.all([n.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[e],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]),fetch(t).then(l=>l.arrayBuffer())]),a=await s.createMediaKeys();await a.setServerCertificate(r),await i.setMediaKeys(a)}function nl(e){return String.fromCharCode.apply(null,[...new Uint8Array(e)])}function of(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}var lf=class{constructor(e){this.eventTarget=e,this.unsubscribers=[]}addEventListener(e,t,i){this.eventTarget.addEventListener(e,t,i);let n=()=>{this.removeEventListener(e,t)};return this.unsubscribers.push(n),n}removeEventListener(e,t,i){this.eventTarget.removeEventListener(e,t,i)}dispatchEvent(e){return this.eventTarget.dispatchEvent(e)}destroy(){for(;this.unsubscribers.length;){let e=this.unsubscribers.pop();e&&e()}}};async function Tl(e,t=5e3){let i=await Ks([fetch(e).catch(r=>({ok:!1,statusText:`Could not fetch ${e}`,status:0,text:()=>Promise.resolve(r instanceof Error?r.message:"Unknown error")}))],{timeout:t,rejectError:w(`Timeout of ${t}ms exceeded when fetching manifest`,{manifestUrl:e,timeoutMs:t},E.NETWORK_PROBLEM_31000)});if(fi(i))throw i;if(!i.ok)throw w(`Failed to fetch manifest: ${i.statusText}`,{manifestUrl:e,response:{status:i.status,statusText:i.statusText},timeoutMs:t},i.status===404||i.status===0?E.CONTENT_NOT_AVAILABLE_21100:E.NETWORK_PROBLEM_31000);let n=await i.text(),s=new $i;return s.push(n),s.end(),s.manifest}var cf=async(e,t)=>{let i=new URL(e,t).toString();return Tl(i)};function uf(e){let t=e.playlists[0];if(!t)return;let n=(t.attributes.CODECS||"").split(",").map(r=>r.trim()),s=["ac-3","alac","ec-3","fLaC","mp4a"];return n.find(r=>{let a=r.split(".")[0];return s.includes(a)})}var Ot={VOD:"VOD",Event:"EVENT",Unknown:"UNKNOWN"};function df(e){switch((e.playlistType||"").toUpperCase()){case"VOD":return Ot.VOD;case"EVENT":return Ot.Event;default:return Ot.Unknown}}function hf(e){if(!e.playlists||e.playlists.length===0)return[];let t=["avc1","avc3","dvh1","dvh1","hev1","hvc1","mjpg"],i=e.playlists.map(n=>{let a=(n.attributes.CODECS||"").split(",").find(o=>{let c=o.split(".")[0];return t.includes(c)}),{width:l,height:u}=n.attributes.RESOLUTION||{width:-1,height:-1};return{trackId:n.uri,active:!1,bitrateInKbps:Number(n.attributes.BANDWIDTH)/1e3,framesPerSecond:n.attributes["FRAME-RATE"]?Number(n.attributes["FRAME-RATE"]):void 0,width:l,height:u,codec:a,mimeType:"application/vnd.apple.mpegurl"}});return i.sort((n,s)=>n.bitrateInKbps-s.bitrateInKbps),i[i.length-1].active=!0,i}function zs(e,t){if(t)return t;if(!Intl?.DisplayNames)return e;if(!e)return"";if(!$s("languages")&&!$s("language"))return e;let i=navigator.languages;if(!i||i.length===0){let s=navigator.language;i=s?s.split(","):[]}return i=i.map(s=>s.split(";")[0].trim()).filter(s=>!!s),(i.length===0||!i[0])&&(i=["de"]),new Intl.DisplayNames(i,{type:"language"}).of(e)||e}function pf(e,t,i,n){let s=r=>{n&&!n(r)||(i(r),e.removeEventListener(t,s))};return e.addEventListener(t,s),()=>e.removeEventListener(t,s)}function ff(e){let t,i=()=>{t&&(clearTimeout(t),t=void 0)};return{startTimer:(s=1e3)=>{i(),t=setTimeout(()=>{e(),i()},s)},clearTimer:i}}function gf(e){return e.includes("The request is not allowed by the user agent or the platform")||e.includes("play() can only be initiated by a user gesture")||e.includes("The operation is not supported")||e.includes("The play() request was interrupted because a pause was requested by the browser")||e.includes("The play method is not allowed by the user agent")||e.includes("play() failed because the user didn't interact with the document first")?E.MISSING_USER_INTERACTION_35310:e.includes("The operation was aborted")?E.OPERATION_ABORTED_35400:e.includes("The play() request was interrupted by a call to pause()")||e.includes("The play() request was interrupted because a pause was requested by the user")?E.OPERATION_ABORTED_PLAY_35410:e.includes("The fetching process for the media resource was aborted by the user agent at the user's request")||e.includes("The play() request was interrupted by a new load request")?E.OPERATION_ABORTED_LOAD_35420:e.includes("The play() request was interrupted because video-only background media was paused to save power")?E.OPERATION_ABORTED_POWER_SAVING_35430:e.includes("The play() request was interrupted because the media was removed from the document")?E.OPERATION_ABORTED_VIDEO_REMOVED_35440:e.includes("DEMUXER_ERROR_DETECTED_AAC")?E.MEDIA_FORMAT_UNSUPPORTED_20100:E.ERROR_NOT_TREATED_59000}var mf=e=>e&&typeof e=="object"&&"code"in e?e?.code:null,bf=e=>{let t="An error has occurred";return e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&e.message||t};function ji(e){let t=E.ERROR_NOT_TREATED_59000,i=mf(e),n=bf(e);if(e&&typeof e=="object"&&"message"in e&&typeof e?.message=="string"&&e.message)t=gf(e?.message);else if(i)switch(i){case MediaError.MEDIA_ERR_ABORTED:t=E.OPERATION_ABORTED_35400,n="The operation was aborted by the client or the browser.";break;case MediaError.MEDIA_ERR_NETWORK:t=E.NETWORK_PROBLEM_31000,n="A network error occurred while fetching the media.";break;case MediaError.MEDIA_ERR_DECODE:case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:t=E.MANIFEST_NOT_SUPPORTED_32220,n="The media format is not supported or could not be decoded.";break;default:t=E.ERROR_NOT_TREATED_59000}return w(n,{originalEvent:e},t)}var yf=class{constructor(e,t){this.player=e,this.tweaks=t,this.state=new ll({state:"ready",currentTimeInSeconds:0,durationInSeconds:0,timeShiftedInSeconds:0,currentVideoTrack:void 0,droppedFrames:0,averageThroughputInKbps:0,activeCues:[],playbackRate:1}),this.logger=re("adapter.native"),this.loadRequest=void 0,this.canAutoplay=!1,this.eventBus=new lf(this.player);let{startTimer:i,clearTimer:n}=ff(()=>{this.state.patch({state:"stalled"})});this.eventBus.addEventListener("timeupdate",()=>{n(),this.state.patch({currentTimeInSeconds:this.player.currentTime,state:this.player.paused?"ready":"playing"}),i(2e3)}),this.eventBus.addEventListener("error",()=>{let r=ji(this.player.error);this.state.patch({state:"error",error:r})}),this.eventBus.addEventListener("ended",()=>{this.state.patch({state:"ended"})}),this.eventBus.addEventListener("paused",()=>{n(),this.state.patch({state:this.player.paused?"ready":"playing"})}),this.eventBus.addEventListener("stalled",()=>i()),this.eventBus.addEventListener("waiting",()=>i()),this.eventBus.addEventListener("playing",()=>{n(),this.state.patch({state:"playing"}),i(5e3)}),this.eventBus.addEventListener("ratechange",()=>{this.state.patch({playbackRate:this.player.playbackRate})}),this.eventBus.addEventListener("durationchange",()=>{if(this.assetInformation?.livestream)return;let r=tl(this.player.duration,this.state.value.durationInSeconds);this.state.patch({durationInSeconds:r}),this.assetInformation&&(this.assetInformation.durationInSeconds=r)}),this.eventBus.addEventListener("seeked",()=>{this.assetInformation?.livestream&&this.state.patch({timeShiftedInSeconds:this.getDistanceToLiveEdgeInSeconds()})});let s=["canplay","loadeddata","loadedmetadata","encrypted","error","waiting","playing","stalled","emptied","durationchange"];for(let r of s){let a=re(`adapter.native.event.${r}`);a.isLoggingActiveForLevel(fe.Trace)&&this.eventBus.addEventListener(r,l=>{a.debug("",l)})}}beforeSwitchAdapter(){return Promise.resolve()}async destroy(){this.logger.debug("Destroying native player adapter"),this.eventBus.destroy(),await this.resetIfNecessary()}getPlayerType(){return"native"}getRootPlayer(){return this.player}async load(e){this.logger.debug("Next load request received",e),await this.resetIfNecessary();let t=e.manifestType===se.Hls,i=nn();
662e.drmConfig&&pf(this.eventBus,"encrypted",g=>{rf(g,e.drmConfig).then(p=>i.resolve(p)).catch(p=>{this.logger.error("Error handling Fairplay DRM. Resetting media keys",p),this.player.setMediaKeys(null),i.reject(p)})});let n=Nt(this.eventBus),s=n("canplay"),r=n("error").then(()=>ji(this.player.error)),a=n("loadedmetadata");this.logger.debug("Resetting autoplay for new load request",e),this.player.autoplay=!1,this.player.src=e.assetUrl,this.logger.debug("Player src set to",e.assetUrl);let l,u=[],o=this.player.duration===Number.POSITIVE_INFINITY,c=!1;if(t){this.logger.debug("Parsing HLS manifest",e.assetUrl);let g=await Tl(e.assetUrl);l=uf(g),u=hf(g);let p=Ot.Unknown,y=g.playlists[0];if(y){let m=await cf(y.uri,e.assetUrl);p=df(m),c=!!m.contentProtection}switch(p){case Ot.VOD:o=!1;break;case Ot.Event:o=!0;break}this.logger.debug("Parsed HLS manifest",{audioCodec:l,videoTracks:u,livestream:o,streamIsEncrypted:c})}if(this.logger.debug("Waiting for player to be ready"),await Promise.race([a,r.then(g=>Promise.reject(g))]),this.logger.debug("Metadata is available"),this.tweaks.playerRequiresLoadBeforeReady)try{this.player.load()}catch(g){throw ji(g)}!c&&e.drmConfig&&this.logger.warn("The manifest is not encrypted, but a DRM config was provided. The DRM config will be ignored!");let d;if(c&&e.drmConfig){this.logger.debug("Waiting for DRM config to be resolved");let g=await Promise.race([i.promise,r.then(p=>Promise.reject(p))]);d=g.drmConfig,this.mediaKeySession=g.session,this.logger.debug("DRM config resolved",d)}await Promise.race([s,r.then(g=>Promise.reject(g))]),e.startTimeInSeconds&&(this.logger.debug("Seeking to start time",e.startTimeInSeconds),await this.seekTo(e.startTimeInSeconds),this.state.patch({currentTimeInSeconds:e.startTimeInSeconds||0}),this.logger.debug("Seeked to start time",e.startTimeInSeconds)),u.length===0&&u.push({trackId:"1",bitrateInKbps:0,width:this.player.videoWidth,height:this.player.videoHeight,active:!0}),this.player.duration===Number.POSITIVE_INFINITY&&(this.logger.debug("Player duration is Infinity, treating stream as livestream",{duration:this.player.duration,livestreamAccordingToManifest:o}),o=!0);let h=o?-1:tl(this.player.duration,0);this.state.patch({state:"ready",currentTimeInSeconds:this.player.currentTime,currentVideoTrack:u.find(g=>g.active),durationInSeconds:h});let f=this.getAudioTracks();return await this.disableTextTrack(),this.loadRequest=e,this.assetInformation={livestream:o,durationInSeconds:h,videoTracks:u,audioTracks:f?Array.from(f,(g,p)=>({trackId:String(p),language:g.language||"",label:zs(g.language,g.label),role:g.kind,active:g.enabled,codec:l,mimeType:t?"audio/mp4":void 0})):[],usedDrmConfig:d,textTracks:this.getTextTracks()},this.logger.debug("Returning asset information after loading the asset.",this.assetInformation),this.assetInformation}getTextTracks(){let e=[],t=this.player.textTracks?this.player.textTracks:[];for(let i=0;i<t.length;i++){let n=t[i];!n.language&&!n.label||e.push({trackId:String(i),language:n.language||"",label:zs(n.language,n.label),active:n.mode!=="disabled"})}return e}mute(){return this.player.muted=!0,Promise.resolve()}async pause(){let e=Nt(this.eventBus)("pause");this.player.pause(),this.player.paused||await e,this.state.patch({state:"ready"})}async play(){let e=Nt(this.eventBus)("playing");this.assetInformation?.livestream&&(this.logger.debug("Seeking to live edge before starting playback, because the stream is a livestream"),this.seekToLiveEdge());try{await(this.player.play()||Promise.resolve())}catch(t){throw ji(t)}this.logger.debug("Waiting for playing event after calling play()"),await e,this.canAutoplay=!0,this.logger.debug("play() was successful, player can autoplay")}async seekTo(e){let t=this.player.paused,i=Nt(this.eventBus),n=i("seeked"),s=i("timeupdate");if(this.player.currentTime=e,!t)try{await Xs([n,s],{timeout:2e3})}catch{return this.play()}}setAudioTrack(e){if(!this.assetInformation)return Promise.resolve();if(!this.assetInformation.audioTracks.find(r=>r.trackId===e))return Promise.reject(w(`Audio track with id ${e} not found!`,{},E.CLIENT_30000));let i=this.getAudioTracks();if(!i)return Promise.reject(w("Native audio track api does not exist!"));let n=this.assetInformation.audioTracks.find(r=>r.active);if(n){let r=i[Number(n.trackId)];r&&(r.enabled=!1)}let s=i[Number(e)];return s?(s.enabled=!0,Promise.resolve()):Promise.reject(w(`Audio track with id ${e} not found on native element!`,{},E.CLIENT_30000))}disableTextTrack(){let e=this.player.textTracks?this.player.textTracks:[];for(let t of e)t.mode="disabled",t.oncuechange=null;return this.state.patch({activeCues:[]}),Promise.resolve()}enableTextTrack(e){return this.assetInformation?this.assetInformation.textTracks.find(i=>i.trackId===e)?this.enableNativeTextTrack(e):Promise.reject(w(`Text track with id ${e} not found!`,{},E.CLIENT_30000)):Promise.resolve()}enableNativeTextTrack(e){let t=this.player.textTracks;
662if(!t)return Promise.reject(w("Native text track api does not exist!"));let i=t[Number(e)];return i?(this.state.patch({activeCues:[]}),i.oncuechange=()=>{let n=Array.from(i.activeCues||[]).map(s=>({id:s.id,startTimeInSeconds:s.startTime,endTimeInSeconds:s.endTime,text:"text"in s?String(s.text):""}));this.state.patch({activeCues:n})},i.mode="hidden",Promise.resolve()):Promise.reject(w(`Text track with id ${e} not found on native element!`,{},E.CLIENT_30000))}setMaxVideoBitrate(){return Promise.resolve()}setPlaybackRate(e){return this.player.playbackRate=e,this.state.patch({playbackRate:e}),Promise.resolve()}setVolume(e){return this.player.volume=e,Promise.resolve()}unmute(){return this.player.muted=!1,Promise.resolve()}getCapabilities(){return{manifestTypes:[se.Hls,se.Progressive],keySystems:[me.Fairplay]}}getAudioTracks(){return"audioTracks"in this.player?this.player.audioTracks:void 0}getLoadRequest(){return this.loadRequest}async testAutoplay(e,t,i){if(this.canAutoplay)return!0;let n=await Dp(this.player,{isMuted:e,hasAacCodecSupport:t,mustCheckUserActivation:i});return this.logger.debug("Test autoplay result",n),this.canAutoplay=n.result,this.canAutoplay}timeShift(e){if(this.player.seekable.length===0)throw w("Cannot time shift, seekable range is empty",{code:E.OPERATION_NOT_SUPPORTED_35500.code});let i=this.player.seekable.start(0),s=this.player.seekable.end(0)-e;if(s=Math.max(i,s),s===this.player.currentTime)return Promise.resolve();let r=Nt(this.eventBus)("seeked");return this.player.currentTime=s,r.then()}seekToLiveEdge(){return this.timeShift(0)}getDVRWindowInSeconds(){return Math.floor(this.player.seekable.end(0)-this.player.seekable.start(0))}getDistanceToLiveEdgeInSeconds(){return Math.max(0,Math.floor(this.player.seekable.end(0)-this.player.currentTime))}updateContentMetadata(){}async resetIfNecessary(){this.mediaKeySession&&(this.logger.debug("Removing previous media key session"),await this.mediaKeySession.close(),this.mediaKeySession=void 0,await this.player.setMediaKeys(null),this.logger.debug("Previous media key session removed")),this.loadRequest&&(this.logger.debug("Player already loaded, resetting player for new load request"),await this.disableTextTrack(),this.player.pause(),this.player.removeAttribute("src"),this.player.load(),this.logger.debug("Player reset"))}};function vf(e,t,i){let n=sn(e);if(!n)throw w("Native player adapter requires a video element to be present in the mount point",{},E.MISSING_PLAYER_ELEMENT_OR_ID_34300);return Rp(n,t),new yf(n,i)}var pi={DRM:"foundation.player.drm",StUS:"foundation.player.stus",Entitlement:"foundation.plugin.entitlement",ConcurrentStreamCheck:"foundation.plugin.concurrentStreamCheck",Nielsen:"foundation.plugin.nielsen"},Ze=async(e,t={})=>{let{timeout:i=1e4,rejectError:n}=t,s=fetch(e,{...t});return Xs([s],{timeout:i,rejectError:n})},Je=class{constructor(e){this.player=e,this.subscriptions=[]}clearSubscriptions(){for(let e of this.subscriptions)e();this.subscriptions=[]}track(e){return(...t)=>{let i=e(...t);return this.subscriptions.push(i),i}}beforeSessionStart(e,t){return Promise.resolve()}modifyLoadRequest(e){return Promise.resolve(e)}beforeLoadRequest(e){return Promise.resolve()}beforeError(e){return Promise.resolve(!0)}};function Ef(e){return e!==null&&typeof e=="object"&&"getKey"in e&&typeof e.getKey=="function"&&"getPlugin"in e&&typeof e.getPlugin=="function"}var wf=60,Sf=class extends Je{constructor(e,t){super(e),this.getRequestHeader=t,this.logger=re("plugin.concurrentStreamCheck"),this.stopWasSend=!1,this.beforeWindowUnload=async()=>{await this.stopBeatTracking()},this.afterWindowRestored=()=>{this.startHooks()},this.stopBeatTracking=async()=>{if(this.stopWasSend||!this.pluginConfig)return;let i=await this.getPayload();this.pluginConfig.stopUrl&&await this.sendRequest(this.pluginConfig.stopUrl,i).catch(n=>this.logger.error("Could not stop concurrent stream check",n)),this.stopWasSend=!0,this.clearBeatSubscription&&this.clearBeatSubscription()}}getKey(){return"foundation.plugin.concurrentStreamCheck"}beforeSessionStart(e){this.clearSubscriptions();let t=e[this.getKey()];return t&&(this.pluginConfig=t,this.startHooks()),Promise.resolve()}startHooks(){if(!this.pluginConfig)return;this.stopWasSend=!1;let e=this.track(this.player.state.once),t=this.track(this.player.state.onValueChange),i=(this.pluginConfig.beatInterval||wf)*1e3,n=async()=>
662{if(!this.pluginConfig)return;let u=await this.getPayload(),o=await this.sendRequest(this.pluginConfig.startUrl,u);if(o?.status===402){let c=await o.text();return await this.player.triggerError(w("Concurrent streams limit reached",{response:c},E.MAX_CONCURRENT_STREAMS_REACHED_33100)),!1}return!0},s,r=async()=>{if(!this.pluginConfig)return;let u=Date.now();if(u-(s||u)<i)return;s=u;let c=await this.getPayload();await this.sendRequest(this.pluginConfig.heartbeatUrl,c)},a=()=>e(({state:u,sessionCompleted:o})=>u==="playing"&&!o,l),l=async({sessionCompleted:u})=>{if(u||!await n().catch(d=>(this.logger.error("Could not start concurrent stream check",d),!1)))return;s=Date.now(),this.clearBeatSubscription=t("currentTimeInSeconds",r);let c=e(({state:d,linearAdActive:h,activeAsset:f,sessionCompleted:g})=>d==="destroyed"?!0:f?.livestream?!h&&["ended","paused","stopped"].includes(d):g,async()=>{await this.stopBeatTracking(),a()});e(({state:d})=>d==="destroyed",()=>{c()})};a()}async sendRequest(e,t){if(e)return Ze(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),timeout:2e3})}async getPayload(){let e;return this.getRequestHeader&&(e=await this.getRequestHeader(pi.ConcurrentStreamCheck)),{...e,sessionKey:this.player.getPlayerId()}}},sl=e=>e.toLowerCase().replace(/[_-]/g,""),sr=(e,t)=>e.replace(/\{([^}]+)\}/g,(i,n)=>{for(let s of t)if(s.exact&&n===s.key||!s.exact&&sl(n)===sl(s.key))return s.value;return i}),Tf=class extends Je{constructor(e,t){super(e),this.player=e,this.getRequestHeader=t}getKey(){return"foundation.plugin.entitlement"}async beforeSessionStart(e){if(this.pluginConfig=e["foundation.plugin.entitlement"],!this.pluginConfig)return;let t=this.pluginConfig.id||this.player.state.value.contentId||"",i={...this.pluginConfig.headers};this.getRequestHeader&&(i={...await this.getRequestHeader(pi.Entitlement),...i});let n=this.pluginConfig.timeout||2e3,s=sr(this.pluginConfig.endpoint,[{key:"mediaid",value:t,exact:!1}]),r=await Ze(s,{method:"POST",timeout:n,headers:i}).catch(l=>l);if(!this.isFetchResponse(r))return;let a=await r.json().catch(()=>({}));if(r.status===403){let l=a;throw new js(E.GEOBLOCKING_12100.message,{code:l.code||E.GEOBLOCKING_12100.code,context:{status:r.status,response:a,message:l.message||"Media blocked by entitlement"}})}"dualAudio"in a&&(this.dualAudio=a.dualAudio)}modifyLoadRequest(e){return e.originalAudioAllowed=this.dualAudio,Promise.resolve(e)}isFetchResponse(e){return!!e&&typeof e=="object"&&"status"in e&&typeof e.status=="number"&&"json"in e&&typeof e.json=="function"}},Zi=()=>"2.23.0",kf=class extends Je{constructor(e,t){super(e),this.pluginConfig=t,this.DEFAULT_TRACKING_INTERVAL=10,this.googleAnalyticsLogger=re("plugin.googleAnalytics4"),this.contentEndedEventWasFired=!1,this.contentType=this.getContentType(this.pluginConfig.contentType),this.contentConfig={id:"",headline:"",start_mode:e.state?.value?.startMethod==="autoplay"?"auto":"user",player_version:Zi()}}getKey(){return"foundation.plugin.googleAnalytics4"}beforeSessionStart(e){this.clearSubscriptions();let t=e[this.getKey()];if(!t)return Promise.resolve();this.lastTimerTriggered=void 0,this.contentEndedEventWasFired=!1,this.pluginConfig=t,this.contentType=this.getContentType(this.pluginConfig.contentType),this.createContentConfig(),this.addInitialEvents(),this.player.state.value.contentType!==W.Advertisement&&this.addContentEvents();let i=this.player.getAdvertisingPlugin();return i&&this.addAdvertisingEvents(i.state),Promise.resolve()}getContentConfig(){if(["video"].includes(this.contentConfig.type||"video")&&this.player.state.value.activeAsset?.videoTracks){let e=this.player.state.value.activeAsset?.videoTracks[0];if(e){let t="landscape";e.width<e.height&&(t="portrait"),this.contentConfig.video_orientation=t}}return{...this.contentConfig,start_mode:this.player.state.value.startMethod==="autoplay"?"auto":"user"}}addInitialEvents(){this.player&&(this.trackOnce(e=>e.state==="ready",()=>{this.trackPi(`${this.contentType}_player_loaded`,{...this.getContentConfig(),[`${this.contentType}_player_loaded`]:1})}),this.trackOnce(e=>e.state==="playing",()=>{this.trackStart()}))}trackStart(){this.trackPi(`${this.contentType}_started`,{...this.getContentConfig(),[`${this.contentType}_started`]:1})}addAdvertisingEvents(e){let t=this.track(e.onValueChange);t("numberOfStartedAdClips",i=>
662{if(i.currentAdClip){let n=this.createAdSlotConfig(i.currentAdClip);n&&this.trackPi(`${this.contentType}_wb_started`,{...n,[`${this.contentType}_wb_started`]:1})}}),t("playedAdClips",i=>{if(i.playedAdClips.length>0){let n=this.createAdSlotConfig(i.playedAdClips[i.playedAdClips.length-1],i.playedAdClips.length);n&&this.trackPi(`${this.contentType}_wb_ended`,{...n,[`${this.contentType}_wb_ended`]:1})}}),t("state",(i,n)=>{if(!this.player)return;if(i.state==="loading"){let r=this.createAdConfig();r&&this.trackPi(`${this.contentType}_wb_requested`,{...r,[`${this.contentType}_wb_requested`]:1})}let s=["ended","error"];if(!s.includes(n)&&s.includes(i.state)){let r=this.getCurrentAdSlot();if(i.totalNumberOfAdClips===0&&r){let l=this.createAdConfig();l&&this.trackPi(`${this.contentType}_wb_not_loaded`,{...l,[`${this.contentType}_wb_not_loaded`]:1})}}})}addContentEvents(){this.player&&(this.trackOnce(e=>e.contentStarted,e=>{e.linearAdActive||this.trackPi(`${this.contentType}_content_started`,{...this.getContentConfig(),[`${this.contentType}_content_started`]:1,length:Math.ceil(this.getDurationInSeconds()||0)}),this.trackValueChange("state",(t,i)=>{t.state==="paused"&&i==="playing"&&(this.isAd()||this.trackPi(`${this.contentType}_paused`,this.getContentConfig())),t.state==="playing"&&i==="paused"&&(this.isAd()||this.trackPi(`${this.contentType}_play_resumed`,this.getContentConfig())),i==="seeking"&&this.trackPi(`${this.contentType}_seeked`,{...this.getContentConfig(),[`${this.contentType}_seeked`]:1})})}),this.trackValueChange("contentWatchTimeInSeconds",e=>{e.contentWatchTimeInSeconds>0&&!e.linearAdActive&&this.trackContentWatchTime(e)}),this.trackOnce(e=>e.contentCompleted,e=>{this.trackContentEndedOnce(e)}))}trackContentWatchTime(e){if(!this.pluginConfig)return;let t=this.getDurationInSeconds()||0,i=Math.floor(e.currentTimeInSeconds||0),n=Math.floor(e.contentWatchTimeInSeconds||0);if(!e.activeAsset?.livestream&&t-i<=3){this.trackContentEndedOnce(e);return}if(this.lastTimerTriggered!==n){let s=this.pluginConfig.progressTrackingIntervalInSeconds||this.DEFAULT_TRACKING_INTERVAL;e.contentWatchTimeInSeconds>1&&Math.floor(e.contentWatchTimeInSeconds)%s===0&&(this.lastTimerTriggered=n,this.trackPi(`${this.contentType}_progressed`,{...this.getContentConfig(),[`${this.contentType}_progressed`]:s}))}}trackContentEndedOnce(e){if(this.contentEndedEventWasFired)return;this.contentEndedEventWasFired=!0;let t=Math.max((e.contentWatchTimeInSeconds||0)-(this.lastTimerTriggered||0),0),i=(this.getDurationInSeconds()||0)-(e.currentTimeInSeconds||0);this.trackPi(`${this.contentType}_content_ended`,{...this.getContentConfig(),[`${this.contentType}_content_ended`]:1,[`${this.contentType}_progressed`]:t+i})}trackPi(e,t){let i=ne();if(!i)return;let n=i.dataLayer??[];i.dataLayer=n,n.push({media:void 0}),n.push({event:e,media:t})}createContentConfig(){if(!this.pluginConfig)return;let e=this.player.state.value;this.trackValueChange("headline",t=>{this.contentConfig.headline=t.headline||""}),this.contentConfig={id:this.pluginConfig.id,headline:this.pluginConfig.headline||e.headline||"",player_version:Zi()||"",start_mode:e.startMethod==="autoplay"?"auto":"user",type:this.pluginConfig.contentType||"video"},this.pluginConfig.tags?.length&&(this.contentConfig.tags=this.pluginConfig.tags),this.pluginConfig.editorialSources?.length&&(this.contentConfig.editorial_sources=this.pluginConfig.editorialSources),this.trackValueChange("title",t=>{this.contentConfig.first_headline=t.title}),(this.pluginConfig.firstHeadline||e.title)&&(this.contentConfig.first_headline=this.pluginConfig.firstHeadline||e.title),this.trackValueChange("firstPublicationDate",t=>{this.contentConfig.first_publication_date=t.firstPublicationDate}),(this.pluginConfig.firstPublicationDate||e.firstPublicationDate)&&(this.contentConfig.first_publication_date=this.pluginConfig.firstPublicationDate||e.firstPublicationDate),this.trackValueChange("lastPublicationDate",t=>{this.contentConfig.last_publication_date=t.lastPublicationDate}),(this.pluginConfig.lastPublicationDate||e.lastPublicationDate)&&(this.contentConfig.last_publication_date=this.pluginConfig.lastPublicationDate||e.lastPublicationDate),this.pluginConfig.keywords&&(this.contentConfig.keywords=this.pluginConfig.keywords),this.pluginConfig.editorialUnit&&(this.contentConfig.editorial_unit=this.pluginConfig.editorialUnit),this.pluginConfig.embedType&&(this.contentConfig.embed_type=this.pluginConfig.embedType),this.pluginConfig.playlist&&(this.contentConfig.playlist=this.pluginConfig.playlist)}getCurrentAdSlot(){return this.player?.getAdvertisingPlugin()?.getCurrentAdSlot()}getCurrentAd(){return this.getAdvertisingState()?.value.currentAdCl
662ip}createAdSlotConfig(e,t){if(!this.pluginConfig)return;let i=this.getCurrentAdSlot();if(!this.player||!i||!e){this.googleAnalyticsLogger.error("Advertising tracking called without playing ad.");return}let n=this.mapAdType(i);if(n!==void 0&&this.shouldTrackAdClip(e?.type))return{...this.getContentConfig(),ad_id:e?.id,ad_slot:`${this.mapAdType(i)} ${t||this.getAdvertisingState()?.value.numberOfStartedCommercials}`,ad_type:n,id:this.pluginConfig.id}}createAdConfig(){if(!this.pluginConfig)return;let e=this.getAdvertisingState()?.value.state,t=this.getCurrentAdSlot();if(e==="idle"||e==="ended"||!t){this.googleAnalyticsLogger.error("Advertising tracking called without playing ad.");return}let i=this.mapAdType(t);if(i!==void 0)return{...this.getContentConfig(),ad_type:i,id:this.pluginConfig.id}}shouldTrackAdClip(e){switch(e){case zi.Commercial:case zi.Sponsored:case zi.ContentFrame:case zi.Overlay:return!0}return!1}mapAdType(e){return e.type==="non-linear"?"nonlinear":e.offsetInSeconds===0?"preroll":e.offsetInSeconds===-1?"postroll":"midroll"}getContentType(e){switch(e){case"audio":case"audioevent":case"audiolivestream":return"audio";case"video":case"videoevent":case"videolivestream":return"video";default:return"video"}}getDurationInSeconds(){return this.player?.state.value.activeAsset?.durationInSeconds}isAd(){return this.player?.state.value.linearAdActive}getAdvertisingState(){return this.player?.getAdvertisingPlugin()?.state}trackOnce(e,t){this.track(this.player.state.once)(e,t)}trackValueChange(e,t){this.track(this.player.state.onValueChange)(e,t)}},Gi={Online:1,Smartphone:2,Tablet:3,SmartTV:4,Stick:5},Qe={Watched30Seconds:"5",Watched90Seconds:"8",Duration90PercentReached:"6",Duration70PercentReached:"9",Duration97PercentReached:"4",KidsStart:"7",Beat:"99"},Af=class extends Je{constructor(e,t,i){super(e),this.pluginConfig=t,this.deviceType=i;let{beatIntervalSeconds:n,parametersBaseObject:s}=this.setPluginParameters(this.pluginConfig);this.beatIntervalSeconds=n,this.parametersBaseObject=s}getKey(){return"foundation.plugin.heartbeat"}beforeSessionStart(e){this.clearSubscriptions();let t=e[this.getKey()];if(!t)return Promise.resolve();this.pluginConfig=t;let{beatIntervalSeconds:i,parametersBaseObject:n}=this.setPluginParameters(this.pluginConfig);this.beatIntervalSeconds=i,this.parametersBaseObject=n;let s,r=this.track(this.player.state.once),a=this.track(this.player.state.onValueChange);return r(({contentStarted:l})=>l,({activeAsset:l,assetUrl:u})=>{if(!l||!u)return;let o=new URL(u);this.parametersBaseObject.videourl=o.pathname,this.pluginConfig.kidsProfile&&this.sendEvent(Qe.KidsStart),s=l.durationInSeconds,l.livestream||this.registerDurationEvents(s);let c=cl(d=>{this.sendEvent(Qe.Beat,d)},-1);a("contentWatchTimeInSeconds",({contentWatchTimeInSeconds:d})=>{let h=Math.trunc(d/this.beatIntervalSeconds);c(h)})}),r(({contentWatchTimeInSeconds:l})=>l>=30,()=>{this.sendEvent(Qe.Watched30Seconds),r(({contentWatchTimeInSeconds:l})=>l>=90,()=>{this.sendEvent(Qe.Watched90Seconds)})}),Promise.resolve()}setPluginParameters(e){let t=e.beatIntervalSeconds&&e.beatIntervalSeconds>1?e.beatIntervalSeconds:30,i=this.getDisplay(this.deviceType),n={videoid:e.id,ivw:e.ivw||"/developer/default",angebot:e.offer,videoservice:e.videoService,paystatus:e.payStatus||0,starttype:e.startType||0,status:e.userStatus||0,display:i,rnd:-1,videourl:""};return{beatIntervalSeconds:t,parametersBaseObject:n}}registerDurationEvents(e){let t=this.track(this.player.state.once),i=n=>n>=30?Math.ceil(n):Math.floor(n);t(({currentTimeInSeconds:n,linearAdActive:s})=>!s&&n>=i(e*.7),()=>{this.sendEvent(Qe.Duration70PercentReached)}),t(({currentTimeInSeconds:n,linearAdActive:s})=>!s&&n>=i(e*.9),()=>{this.sendEvent(Qe.Duration90PercentReached)}),t(({currentTimeInSeconds:n,linearAdActive:s})=>!s&&n>=i(e*.97),()=>{this.sendEvent(Qe.Duration97PercentReached)})}getParametersWithBeatOrEvent(e,t){let i={...this.parametersBaseObject};return e===Qe.Beat?i.beat=t:(i.event=e,i.value=0),i.rnd=Math.round(Number.MAX_SAFE_INTEGER*Math.random()),i}loadPixel(e){let t=new Image;t.src=e}sendEvent(e,t){let i=Object.entries(this.getParametersWithBeatOrEvent(e,t)).sort((s,r)=>s[0].localeCompare(r[0])),n=new URL(this.pluginConfig.endpoint);for(let[s,r]of i)n.searchParams.set(s,String(r));this.loadPixel(n.toString())}getDisplay(e){switch(e){case k.Desktop:return Gi.Online;case k.Mobile:return Gi.Smartphone;case k.Tablet:return Gi.Tablet;default:return Gi.SmartTV}}},Cf=()=>{let e=window;
662return e.foundation?.internal_mediaObserver||(e.foundation||={},e.foundation.internal_mediaObserver=new If),e.foundation.internal_mediaObserver},If=class{constructor(){this.players=[],this.logger=re("plugin.mediaSession"),this.sessionInitialized=!1,this.activePlayer=void 0,this.unsubscribePlayerHooks={},this.unsubscribeActivePlayerHooks=[],this.pluginConfigsForPlayers={}}registerPlayer(e,t){this.players.push(e),this.pluginConfigsForPlayers[e.getPlayerId()]=t,this.registerDefaultListeners(),this.registerPlayerSwitcher(e),(!this.activePlayer||this.activePlayer===e&&this.unsubscribeActivePlayerHooks.length===0)&&this.activatePlayer(e)}removePlayer(e){if(this.logger.debug("Removing player",this.players.length),this.activePlayer===e){let i=this.players.find(n=>n!==e);i?this.activatePlayer(i):(this.unsubscribeAllActivePlayerHooks(),this.activePlayer=void 0)}let t=e.getPlayerId();this.unsubscribePlayerHooks[t]?.forEach(i=>{i()}),delete this.unsubscribePlayerHooks[t],delete this.pluginConfigsForPlayers[t],this.players=this.players.filter(i=>i!==e)}resetObserver(){this.sessionInitialized=!1,this.players.forEach(e=>{this.unsubscribePlayerHooks[e.getPlayerId()].forEach(t=>{t()})}),this.players=[],this.unsubscribeAllActivePlayerHooks(),this.activePlayer=void 0,this.pluginConfigsForPlayers={}}registerPlayerSwitcher(e){this.unsubscribePlayerHooks[e.getPlayerId()]||=[],this.unsubscribePlayerHooks[e.getPlayerId()].push(e.state.onValueChange("state",({state:t})=>{t==="playing"&&this.activePlayer&&this.activePlayer!==e&&["paused","ended","stopped","destroyed","error","ready"].includes(this.activePlayer.state.value.state)&&(this.logger.debug("Switching Player"),this.activatePlayer(e))}))}activatePlayer(e){this.unsubscribeAllActivePlayerHooks(),this.activePlayer=e,this.subscribeToPlayerChanges(e),this.updatePlaylistMode(e)}subscribeToPlayerChanges(e){this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("state",({state:n})=>{switch(n){case"playing":navigator.mediaSession.playbackState="playing";break;case"paused":navigator.mediaSession.playbackState="paused";break}}));let t=n=>{let s=n.activeAsset?.livestream?0:n.activeAsset?.durationInSeconds||0;s<0&&(s=0);let r=n.playbackRate||1,a=Math.min(n.currentTimeInSeconds,s);navigator.mediaSession.setPositionState({duration:s,playbackRate:r,position:a})};this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("currentTimeInSeconds",t)),this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("activeAsset",t));let i=n=>{let s=[],r=this.pluginConfigsForPlayers[e.getPlayerId()],a=n.posterUrl||r?.posterUrl;a&&s.push({src:a});let l={title:n.headline||r?.headline,artist:n.secondaryHeadline||r?.secondaryHeadline,artwork:s};this.logger.debug("Setting media metadata",l),navigator.mediaSession.metadata=new MediaMetadata(l)};this.unsubscribeActivePlayerHooks.push(e.state.once(({startMethod:n})=>n!=="not-started",n=>{navigator.mediaSession.playbackState=n.state==="playing"?"playing":"paused",i(n)})),this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("headline",i)),this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("secondaryHeadline",i)),this.unsubscribeActivePlayerHooks.push(e.state.onValueChange("posterUrl",i))}updatePlaylistMode(e){let t=e.getPlaylist();if(t){let i=()=>{t&&(t.isFirst()?navigator.mediaSession.setActionHandler("previoustrack",null):navigator.mediaSession.setActionHandler("previoustrack",async n=>{e.getPlaylist()?.previous()}),t.isLast()?navigator.mediaSession.setActionHandler("nexttrack",null):navigator.mediaSession.setActionHandler("nexttrack",n=>e.getPlaylist()?.next()))};this.unsubscribeActivePlayerHooks.push(t.state.onValuesChange(["length","index"],()=>{i()}))}else navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null)}registerDefaultListeners(){this.sessionInitialized||(this.sessionInitialized=!0,this.logger.debug("Setting up MediaSession API"),navigator.mediaSession.setActionHandler("play",async()=>{this.activePlayer&&(await this.activePlayer.play(),navigator.mediaSession.playbackState="playing")}),navigator.mediaSession.setActionHandler("pause",async()=>
662{if(this.logger.debug("pause called"),!this.activePlayer)return;await this.activePlayer.pause();let e=this.findOtherActivePlayer(this.activePlayer);e?this.activatePlayer(e):navigator.mediaSession.playbackState="paused"}),navigator.mediaSession.setActionHandler("seekto",async e=>{this.activePlayer&&e.seekTime&&this.shouldBeAllowedToSeek(this.activePlayer)&&await this.activePlayer.seekTo(e.seekTime)}),navigator.mediaSession.setActionHandler("seekbackward",async e=>{if(this.activePlayer&&this.shouldBeAllowedToSeek(this.activePlayer)){let t=this.activePlayer.state.value.currentTimeInSeconds-(e.seekOffset||10);await this.activePlayer.seekTo(t)}}),navigator.mediaSession.setActionHandler("seekforward",async e=>{if(this.activePlayer&&this.shouldBeAllowedToSeek(this.activePlayer)){let t=this.activePlayer.state.value.currentTimeInSeconds+(e.seekOffset||10);await this.activePlayer.seekTo(t)}}))}unsubscribeAllActivePlayerHooks(){this.unsubscribeActivePlayerHooks.forEach(e=>{e()}),this.unsubscribeActivePlayerHooks=[]}findOtherActivePlayer(e){return this.players.find(t=>t!==e&&t.state.value.state==="playing")}shouldBeAllowedToSeek(e){let{linearAdActive:t,activeAsset:i}=e.state.value;return!t&&!i?.livestream}},Lf=class extends Je{constructor(){super(...arguments),this.logger=re("plugin.mediaSession")}getKey(){return"foundation.plugin.mediaSession"}beforeSessionStart(e){let t=Cf();if(!t)return Promise.resolve();t.removePlayer(this.player);let i=e[this.getKey()];return i||this.logger.debug("MediaSession plugin not configured anymore, but still active"),t.registerPlayer(this.player,i),this.player.state.once(n=>n.state==="destroyed",()=>{t.removePlayer(this.player)}),Promise.resolve()}},_t={LoadMetadata:"loadMetadata",Stop:"stop",SetPlayHead:"setPlayheadPosition",End:"end"};function Pf(e,t,i){return(function(n,s){function r(a){return typeof a=="object"?JSON.parse(JSON.stringify(a)):a}n[s]=n[s]||{nlsQ:function(a,l,u){var o=n.document,c=o.createElement("script");c.async=1,c.src=(n.location.protocol==="http:"?"http:":"https:")+"//cdn-gl.nmrodam.com/conf/"+a+".js#name="+l+"&ns="+s;var d=o.getElementsByTagName("script")[0];return d.parentNode.insertBefore(c,d),n[s][l]=n[s][l]||{g:u||{},ggPM:function(h,f,g,p,y){n[s][l].q=n[s][l].q||[];try{var m=r([h,f,g,p,y]);n[s][l].q.push(m)}catch{console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}},trackEvent:function(h){n[s][l].te=n[s][l].te||[];try{var f=r(h);n[s][l].te.push(f)}catch{console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}}},n[s][l]}}})(window,"NOLBUNDLE"),window.NOLBUNDLE.nlsQ(e,t,i)}var Rf=class extends Je{constructor(){super(...arguments),this.isActive=!1,this.metadata={},this.beforeWindowUnload=()=>{this.sdk&&this.isActive&&(this.sdk.ggPM(_t.End,this.getPlayHead()),this.isActive=!1)},this.afterWindowRestored=()=>{this.player.state.value.startMethod!=="not-started"&&this.player.state.once(({state:e,linearAdActive:t,contentStarted:i})=>e==="playing"&&!t&&i,()=>{this.activateNielsen()})},this.getPlayHead=()=>this.player.state.value.activeAsset?.livestream?Math.floor(Date.now()/1e3):Math.floor(this.player.state.value.currentTimeInSeconds)}getKey(){return"foundation.plugin.nielsen"}initializeSDK(e,t){let i={nol_sdkDebug:t?"debug":void 0},n="Foundation Player 2.23.0";return window.NOLBUNDLE?.[n]?.apid===e?window.NOLBUNDLE[n]:Pf(e,n,i)}activateNielsen(e=!1){this.sdk&&this.metadata&&(!this.isActive||e)&&(this.sdk.ggPM(_t.LoadMetadata,this.metadata),this.isActive=!0)}beforeSessionStart(e){this.clearSubscriptions();let t=e[this.getKey()];if(!t)return Promise.resolve();this.metadata=t?.metadata,this.sdk||(this.sdk=this.initializeSDK(t.appId,!!t.debug));let i=this.track(this.player.state.once),n=this.track(this.player.state.onValueChange),s=this.player.state.value.currentTimeInSeconds-1,r,a,l=()=>{if(!this.sdk)return;this.activateNielsen(!0),r?.(),a?.();let o=cl(d=>{!this.sdk||!this.isActive||(this.sdk.ggPM(_t.SetPlayHead,d),s=d)},s),c=n("currentTimeInSeconds",()=>{o(this.getPlayHead())});r=i(({state:d,linearAdActive:h})=>this.isActive&&(h||["paused","stopped","error","stalled"].includes(d)),()=>{this.sdk&&(c(),this.sdk.ggPM(_t.Stop,this.getPlayHead()),u())}),a=i(({contentCompleted:d,state:h})=>this.isActive&&(d||h==="destroyed"),()=>{this.sdk&&(c(),r?.(),this.isActive&&(this.sdk.ggPM(_t.End,this.getPlayHead()),this.isActive=!1))})},u=()=>i(({state:o,linearAdActive:c,contentStarted:d})=>o==="playing"&&!c&&d,l);return u(),i(({contentCompleted:o,sessionCompleted:c})=>(o||c)&&this.isActive,()=>{this.sdk&&(this.sdk.ggPM(_t.End,this.getPlayHead()),this.isActive=!1)}),Promise.resolve()}},xf=class extends Je{constructor(e){super(e),this.logger=re("plugin.streamFallback"),this.endSafetyIntervalMaximumInSeconds=30,this.minTimeBetweenFallbacksInMilliseconds=15e3,this.isProcessingError=!1,this.contentTimeInSeconds=0,this.contentDurationInSeconds=0,this.retryAttempts=[],this.player.state.onValueChange("currentTimeInSeconds",({currentTimeInSeconds:t,linearAdActive:i,activeAsset:n,loop:s})=>{!n||i||(this.contentTimeInSeconds=t,typeof s=="object"&&s.endTimeInSeconds?this.contentDurationInSeconds=s.endTimeInSeconds:this.contentDurationInSeconds=n.durationInSeconds)})}getKey(){return"foundation.plugin.streamFallback"}async beforeError(e){if(this.isProcessingError)return this.logger.warn("Already processing an error, skipping this one.",{error:e}),!1;if(!this.shouldProcessError(e))return!0;this.isProcessingError=!0;let t=Date.now();
662return this.logger.warn("Processing error, trying to recover from it.",{error:e,contentTimeInSeconds:this.contentTimeInSeconds,contentDurationInSeconds:this.contentDurationInSeconds,retryAttempts:this.retryAttempts.length,lastFallbackAttempt:this.retryAttempts.length>0?this.retryAttempts[this.retryAttempts.length-1]:void 0,now:t}),this.retryAttempts.push({attemptedAtTimestampInMs:t,contentId:this.player.state.value.contentId,sourceUrl:this.player.state.value.sourceStatus.find(i=>i.active)?.sourceUrl}),this.player.replay({startTimeInSeconds:this.contentTimeInSeconds+1,skipPreRolls:!0}).catch(i=>{this.logger.warn("Fallback replay failed",i)}).finally(()=>{this.isProcessingError=!1}),!1}endSafetyIntervalInSeconds(){return Math.max(Math.round(this.contentDurationInSeconds/100*5),this.endSafetyIntervalMaximumInSeconds)}hasReachedSafeEndTime(){return!this.contentDurationInSeconds||this.contentDurationInSeconds<=0?!1:this.contentTimeInSeconds>=this.contentDurationInSeconds-this.endSafetyIntervalInSeconds()}shouldProcessError(e){if(e.code===E.OPERATION_ABORTED_35400.code&&this.player.state.value.startMethod==="not-started")return this.logger.debug("Abort Error triggered during start, trying fallback handling",{error:e,startMethod:this.player.state.value.startMethod}),!0;if(this.player.state.value.startMethod==="not-started")return this.logger.debug("Player has not started yet, skipping error processing for in-stream fallback.",{error:e,startMethod:this.player.state.value.startMethod}),!1;if(this.hasReachedSafeEndTime())return this.logger.debug("Stream is close to the end, do not attempt fallback anymore",{error:e,contentTimeInSeconds:this.contentTimeInSeconds,contentDurationInSeconds:this.contentDurationInSeconds}),!1;let t=[E.GEOBLOCKING_12100.code,E.MAX_CONCURRENT_STREAMS_REACHED_33100.code,E.ADBLOCKER_DETECTED_34100.code];if(t.includes(e.code))return this.logger.debug("Ignoring error, as it is not recoverable by the stream fallback plugin.",{error:e,ignoredErrorCodes:t}),!1;let i=Date.now(),n=this.player.state.value.sourceStatus.find(a=>a.active),s=this.retryAttempts[this.retryAttempts.length-1];return s&&n&&Math.abs(i-s.attemptedAtTimestampInMs)<this.minTimeBetweenFallbacksInMilliseconds&&n.sourceUrl===s.sourceUrl&&(this.logger.warn("Deny source url due to rapid consecutive errors.",{error:e,lastAttempt:s,activeSource:n,contentTimeInSeconds:this.contentTimeInSeconds,minTimeBetweenFallbacksInMilliseconds:this.minTimeBetweenFallbacksInMilliseconds,now:i}),this.player.denySourceUrl(n.sourceUrl,i+this.minTimeBetweenFallbacksInMilliseconds)),this.player.state.value.sourceStatus.filter(a=>!a.denyUntilTimestampInMs||a.denyUntilTimestampInMs<=i).length===0?(this.logger.warn("Exhausted all available sources, skipping this error.",{error:e,retryAttempts:this.retryAttempts,contentTimeInSeconds:this.contentTimeInSeconds,sourceStatus:this.player.state.value.sourceStatus,now:i}),!1):!0}},_f=class extends Je{constructor(e,t,i){super(e),this.pluginConfig=t,this.mountPoint=i,this.playerIntersectionThreshold=.5,this.playerIntersectionRatio=1,this.visibilityListenerRegistered=!1,this.pageVisibility="visible",this.webkitBeginFullscreenHandler=()=>{this.webkitDisplayingFullscreen=!0,this.onPlayerEnteredViewport(!0)},this.webkitEndFullscreenHandler=()=>{this.webkitDisplayingFullscreen=!1,this.playerIntersectionRatio<this.playerIntersectionThreshold&&this.onPlayerLeftViewport()},this.adsPausedByVisibility=!1,this.contentPausedByVisibility=!1,this.webkitDisplayingFullscreen=!1,this.visibilityChangeEvent=async()=>{document.hidden?(this.pageVisibility="hidden",await this.onPageLeave()):(this.pageVisibility="visible",await this.onPageEnter(this.playerIsVisible()))}}getKey(){return"foundation.plugin.visibility"}getPlugin(){return this}shouldPauseAdsOnLeave(){return this.pluginConfig?.pauseAds??!0}shouldPauseContentOnLeave(){return this.pluginConfig?.pauseContent??!1}beforeSessionStart(){return this.player&&(this.player.state.once(({state:e})=>e==="destroyed",()=>{this.unbindVisibility()}),this.player.state.onValueChange("state",({state:e})=>{e==="playing"&&(this.contentPausedByVisibility=!1,this.adsPausedByVisibility=!1)}),this.videoElement=this.findVideoElementInMountPoint(),this.videoElement&&(this.videoElement.addEventListener("webkitbeginfullscreen",this.webkitBeginFullscreenHandler),this.videoElement.addEventListener("webkitendfullscreen",this.webkitEndFullscreenHandler)),this.initVisibility()),Promise.resolve()}isInDocumentPictureInPicture(){let e=window;return"documentPictureInPicture"in window&&e.documentPictureInPicture?.window!==void 0&&this.mountPoint.ownerDocument!==document}onPlayerLeftViewport(){this.player.isFullscreen()||this.isInDocumentPictureInPicture()||(this.shouldPauseAds()&&(this.player.pause(),this.adsPausedByVisibility=!0),this.shouldPauseContent()&&
662(this.player.pause(),this.contentPausedByVisibility=!0))}shouldPauseAds(){return this.player.state.value.state==="playing"&&this.shouldPauseAdsOnLeave()&&this.isLinearNonInteractiveAdActive()}shouldPauseContent(){return this.player.state.value.state==="playing"&&this.shouldPauseContentOnLeave()&&!this.isLinearNonInteractiveAdActive()}shouldResumeAds(){return this.shouldPauseAdsOnLeave()&&this.adsPausedByVisibility&&this.isLinearNonInteractiveAdActive()}shouldResumeContent(){return this.shouldPauseContentOnLeave()&&this.contentPausedByVisibility&&!this.isLinearNonInteractiveAdActive()}async onPlayerEnteredViewport(e){!this.player||!e||this.player.state.value.state==="playing"||(this.shouldResumeAds()?(this.adsPausedByVisibility=!1,await this.player.play()):this.shouldResumeContent()&&(this.contentPausedByVisibility=!1,await this.player.play()))}playerIsVisible(){return this.pageVisibility==="visible"&&this.playerIntersectionRatio>=this.playerIntersectionThreshold}initVisibility(){!this.player||this.visibilityListenerRegistered||!(this.shouldPauseAdsOnLeave()||this.shouldPauseContentOnLeave())||(this.pageVisibility=document.hidden?"hidden":"visible",this.player.state.onValueChange("currentTimeInSeconds",async()=>{this.pageVisibility==="hidden"&&await this.onPageLeave(),this.playerIntersectionRatio<this.playerIntersectionThreshold&&!this.webkitDisplayingFullscreen&&this.onPlayerLeftViewport()}),this.useVisibilityListener(),this.useIntersectionObserver())}isLinearNonInteractiveAdActive(){let e=this.player.getAdvertisingPlugin()?.state.value.currentAdClip?.isInteractive??!1;return this.player.state.value.linearAdActive&&!e}async onPageLeave(){this.shouldPauseAds()?(await this.player.pause(),this.adsPausedByVisibility=!0):this.shouldPauseContent()&&(await this.player.pause(),this.contentPausedByVisibility=!0)}async onPageEnter(e){!this.player||!e||this.player.state.value.state==="playing"||(this.shouldResumeAds()?(await this.player.play(),this.adsPausedByVisibility=!1):this.shouldResumeContent()&&(await this.player.play(),this.contentPausedByVisibility=!1))}useVisibilityListener(){document.addEventListener("visibilitychange",this.visibilityChangeEvent),this.visibilityListenerRegistered=!0}useIntersectionObserver(){this.player&&"IntersectionObserver"in window&&(this.intersectionObserver=new IntersectionObserver(e=>{this.playerIntersectionRatio=e[0]?.intersectionRatio??1,this.webkitDisplayingFullscreen||(this.playerIntersectionRatio>=this.playerIntersectionThreshold?this.onPlayerEnteredViewport(this.playerIsVisible()):this.onPlayerLeftViewport())},{threshold:this.playerIntersectionThreshold}),this.intersectionObserver.observe(this.mountPoint))}unbindVisibility(){this.visibilityListenerRegistered&&(document.removeEventListener("visibilitychange",this.visibilityChangeEvent),this.visibilityListenerRegistered=!1),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0),this.videoElement&&(this.videoElement.removeEventListener("webkitbeginfullscreen",this.webkitBeginFullscreenHandler),this.videoElement.removeEventListener("webkitendfullscreen",this.webkitEndFullscreenHandler),this.videoElement=void 0)}findVideoElementInMountPoint(){return sn(this.mountPoint)}},kl=(e,t)=>{let{remotePlayback:i,deviceType:n,pluginConfigs:s,playerId:r,resolvedModules:a,manifestConfiguration:l,mountPoint:u,getRequestHeader:o,loadRequest:c,tweaks:d}=t,h={};for(let C of a)h[C[0]]=C[1];let f=[],g=[],p=C=>{let z=s[C];if(z&&!e.hasPlugin(C))return z},y=p("foundation.plugin.npaw");if(y){let C=h["@foundation-player/plugin-npaw"];if(!C)throw w("NPAW plugin is not available, but must be!",{resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);f.push(new C.NpawPlugin(e,y,n,r))}if(p("foundation.plugin.smartclip")){let C=h["@foundation-player/plugin-smartclip"];if(!C)throw w("Smartclip plugin is not available, but must be!",{resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);let z=new C.SmartclipPlugin(e,u,c.user?.consentString);f.push(z)}if(p("foundation.plugin.vast4")){let C=h["@foundation-player/plugin-vast4"];if(!C)throw w("Vast4 plugin is not available, but must be!",{resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);let z=new C.Vast4Plugin(e,u,c.user?.consentString);f.push(z)}let v=p("foundation.plugin.ui");if(v){let C=h["@foundation-player/plugin-ui"];if(!C)throw w("UI plugin is not available, but must be!",{resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);f.push(new C.UiPlugin(e,u,v))}let T=p("foundation.plugin.shortsUi");
662if(T){let C=h["@foundation-player/plugin-shorts"];if(!C)throw w("Shorts plugin is not available, but must be!",{resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);f.push(new C.ShortsUiPlugin(e,u,T))}p("foundation.plugin.concurrentStreamCheck")&&f.push(new Sf(e,o)),p("foundation.plugin.nielsen")&&f.push(new Rf(e)),p("foundation.plugin.entitlement")&&f.push(new Tf(e,o));let L=p("foundation.plugin.heartbeat");L&&f.push(new Af(e,L,n));let M=p("foundation.plugin.googleAnalytics4");M&&f.push(new kf(e,M)),p("foundation.plugin.mediaSession")&&f.push(new Lf(e));let j=p("foundation.plugin.visibility");j&&f.push(new _f(e,j,u)),p("foundation.plugin.streamFallback")&&f.push(new xf(e));let B=s["foundation.plugin.smartclip"]||s["foundation.plugin.vast4"],I=l?.type===se.Dash,N=n===k.Chromecast,H=n===k.Vega,O=I&&!N&&!H;if((B||!I)&&!N&&!H&&!e.hasPlayerAdapter("native")){let C=vf(u,i,d);g.push(C)}if(O&&!e.hasPlayerAdapter("dash.js")){let C=h["@foundation-player/player-dashjs"];if(!C)throw w("dash.js is not available, but must be!",{manifestConfiguration:l,resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);let z=C.createDashJsPlayerAdapter(u,i,d);g.push(z)}if(N&&!e.hasPlayerAdapter("Chromecast")){let C=h["@foundation-player/player-chromecast"];if(!C)throw w("Chromecast is not available, but must be!",{manifestConfiguration:l,resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);let z=C.createChromecastPlayerAdapter();g.push(z)}if(H&&!e.hasPlayerAdapter("Vega")){let C=h["@foundation-player/player-vega"];if(!C)throw w("Vega is not available, but must be!",{manifestConfiguration:l,resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);let z=C.createVegaPlayerAdapter();g.push(z)}let q=p("foundation.plugin.yospace");if(q){let C=h["@foundation-player/plugin-yospace"];if(!C)throw w("Yospace is not available, but must be!",{manifestConfiguration:l,resolvedModules:a},E.PLAYER_DEPENDENCY_INVALID_52130);f.push(new C.YospacePlugin(e,q,u,n,c.user?.consentString))}return{plugins:f,playerAdapters:g}},Mf=async(e,t,i,n)=>{let s={timeout:i,headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"};n&&(s={...s,headers:{...s.headers,...n}});let r={...t,time:Date.now(),url:e,allowed:!0},a=w(`Advertising service request timed out after ${s.timeout} ms`,{timeout:s.timeout,requestDebugInformation:r},E.DEPENDENCY_40000),l=await Ze(e,{...s,rejectError:a});if(l.status!==200)throw w(`Advertising service returned status code ${l.status}`,{requestDebugInformation:r,responseDebugInformation:{time:Date.now(),statusCode:l.status,body:await l.text(),usedService:!0}},E.DEPENDENCY_40000);let u=await l.json(),o={time:Date.now(),statusCode:l.status,body:u,usedService:!0},c="",d=ne()?.MoltenBundle?.Video;return d?.getSXPKeysAsync&&typeof d.getSXPKeysAsync=="function"&&(c=await d.getSXPKeysAsync()),{adSlots:Of(u,c),requestDebugInformation:r,responseDebugInformation:o}},Nf=(e,t)=>{let i=t.advertisingService?.endpoint||"",n={mediaId:e.contentId},s=Df(i,n),r={time:Date.now(),urlTemplate:i,placeholders:n,url:s};return!e.contentId||!i?{url:"",requestDebugInformation:r,enable:!1}:{url:s,requestDebugInformation:r,enable:t?.advertisingService?.enable===!0}},Of=(e,t)=>{let i=n=>{let s=new URL(n);return s.searchParams.size===0?`${s.toString()}?${t}`:`${s.toString()}&${t}`};return e.slots.map(n=>({type:n.adType==="LINEAR"?"linear":"non-linear",adCall:t?i(n.adCall):n.adCall,offsetInSeconds:n.offset,allowSkipAfterSeconds:n.skippable}))},Df=(e,t)=>e.replace("{MEDIA_ID}",t.mediaId||""),Hf=e=>({headline:e.headline||void 0,secondaryHeadline:e.secondaryHeadline||void 0,posterUrl:e.posterImage||void 0,durationInSeconds:e.durationInSeconds||void 0}),Vf=async(e,t,i)=>{let n={timeout:i,headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"},s={...t,time:Date.now(),url:e},r=w(`Metadata service request timed out after ${n.timeout} ms`,{timeout:n.timeout,requestDebugInformation:s},E.DEPENDENCY_40000),a=await Ze(e,{...n,rejectError:r});if(a.status!==200)throw w(`Metadata service returned status code ${a.status}`,{requestDebugInformation:s,responseDebugInformation:{time:Date.now(),statusCode:a.status,body:await a.text(),usedService:!0}},E.DEPENDENCY_40000);let l=await a.json(),u={time:Date.now(),statusCode:a.status,body:l,usedService:!0};return{metadata:Hf(l),requestDebugInformation:s,responseDebugInformation:u}},Uf=e=>{switch(e){case W.Audiobook:return"audiobook";case W.Event:return"event";case W.Vod:return"vod";case W.Fast:return"fast";case W.Live:return"live";case W.Podcast:return"podcast";case W.Radio:return"radio";case W.Text_To_Speech:return"tts";default:return}},Bf=(e,t)=>
662sr(e,[{key:"mediaid",value:t.mediaId||"",exact:!1}]),Ff=(e,t)=>{let i=Uf(e.contentType),n;if(i&&e.contentProvider){let u=t.metadataService?.[i];n=u&&typeof u=="object"&&u[e.contentProvider]?u[e.contentProvider]:void 0}let s=n?.endpoint||"",r={mediaId:e.contentId},a=Bf(s,r),l={time:Date.now(),urlTemplate:s,placeholders:r,url:a};return!e.contentId||!s?{url:"",requestDebugInformation:l,enable:!1}:{url:a,requestDebugInformation:l,enable:n?.enable===!0}},qf=1440*60*1e3;async function Wf(e,t,i){let n=`https://rc.${$f(t)}.streamingtech.de/config/${e}`,s=`foundation:remoteConfig:${e}`;try{let l=await Ze(n,{timeout:i||5e3});if(l.ok){let u=await l.json(),o={timestamp:Date.now(),config:u};return localStorage.setItem(s,JSON.stringify(o)),u}}catch(a){console.error(`Failed to fetch remote config from ${n}`,a)}let r=localStorage.getItem(s);if(r){let a=JSON.parse(r),l=Date.now()-a.timestamp;if(l<qf)return console.warn(`Using cached remote config for clientIdentifier ${e}, age: ${l}ms`),a.config;console.warn(`Cached remote config for clientIdentifier ${e} is too old (${l}ms), ignoring and removing.`),localStorage.removeItem(s)}return{}}function $f(e){switch(e){case Xi.Dev:return"player-dev";case Xi.Preprod:return"player-preprod";default:return"player"}}function zf(e){return!!(Object.keys(e).length===2&&e.clientIdentifier&&e.environment)}function jf(e){return!!(Object.keys(e).length===1&&e.clientIdentifier)}async function Gf(e,t){return e?zf(e)?Wf(e.clientIdentifier,e.environment,t):jf(e)?(console.error("Cannot fetch remote config with only clientIdentifier. You forgot to provide environment!"),{}):e:{}}function Al(e){switch(e){case k.Webos_3:case k.Webos_4:case k.Webos_5:case k.Webos_6:case k.Webos_22:case k.Webos_23:case k.Webos_24:case k.Webos_25:return"lg";case k.Tizen_3_0:case k.Tizen_4_0:case k.Tizen_5_0:case k.Tizen_5_5:case k.Tizen_6_0:case k.Tizen_6_5:case k.Tizen_7_0:case k.Tizen_8_0:case k.Tizen_9_0:case k.Tizen_10_0:return"tizen";case k.Magenta_G4:case k.Magenta_G5:return"magenta";case k.Skyq:case k.Skyxione:case k.Skystream:return"sky";case k.Vodafone_Vtv:return"vodafone-vtv";case k.Vodafone_Gtv:return"vodafone-gtv";case k.Telecolumbus:return"tc";case k.Kepler:case k.Vega:return"vega";case k.Hisense:return"hisense";default:return"web"}}var Yf=e=>e===void 0?[]:e.filter(t=>t.outputSet==="WEBVTT_TEXT").map(t=>({type:Gs.Vtt,url:t.url,label:t.language,language:t.languageCode})),Kf=async(e,t,i,n)=>{let s={timeout:i,headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"};n&&(s={...s,headers:{...s.headers,...n}});let r={...t,time:Date.now(),url:e,allowed:!0},a=w(`StUS request timed out after ${s.timeout} ms`,{timeout:s.timeout,requestDebugInformation:r},E.STUS_SCHEDULER_REQUEST_TIMED_OUT_43800),l=await Ze(e,{...s,rejectError:a});if(l.status!==200){let h;throw l.status>=400&&l.status<500?h=E.STUS_RETURNS_4XX_ERROR_42800:l.status>=500?h=E.STUS_RETURNS_5XX_ERROR_42810:h=E.STUS_UNAVAILABLE_41800,w(`StUS returned status code ${l.status}`,{requestDebugInformation:r,responseDebugInformation:{time:Date.now(),statusCode:l.status,body:await l.text(),usedService:!0}},h)}let u=await l.json(),o={time:Date.now(),statusCode:l.status,body:u,usedService:!0},c=u.find(h=>h.thumbnails)?.thumbnails||void 0;c||(c=u[0]?.sources.find(h=>h.thumbnails)?.thumbnails||void 0);let d=[];return u[0]&&u[0].sources.length>0&&(d=u[0].sources.find(h=>(h.subtitles?.length||0)>0)?.subtitles||void 0),{manifests:Zf(u),thumbnailUrl:c,requestDebugInformation:r,responseDebugInformation:o,textTracks:Yf(d)}},Xf=e=>{switch(e){case W.Audiobook:return"audiobook";case W.Event:return"event";case W.Vod:return"vod";case W.Fast:return"fast";case W.Live:return"live";case W.Podcast:return"podcast";case W.Radio:return"radio";case W.Text_To_Speech:return"tts"}},Qf=(e,t,i)=>{let n,s=Xf(e.contentType),r={url:"",externalUrlAllowed:!0,requestDebugInformation:{time:Date.now(),urlTemplate:"",placeholders:{},url:""}};if(!s)return r;let a=s?t.streamingURLService?.[s]:void 0;if(e.contentProvider&&(n=a&&typeof a=="object"&&a[e.contentProvider]?a[e.contentProvider]:void 0),n||(n=a&&typeof a=="object"?a:void 0),!n?.enable)return r;let l=n?.endpoint||"",u=n?.externalUrlAllowed||!1,o={mediaId:e.contentId,platform:Al(i)},c=Jf(l,o),d={time:Date.now(),urlTemplate:l,placeholders:o,url:c};return!e.contentId||!l?{url:"",externalUrlAllowed:!0,requestDebugInformation:d}:{url:c,externalUrlAllowed:u,requestDebugInformation:d}},Zf=e=>{let t=e.find(a=>a.name==="dashhd"),i=e.find(a=>a.name==="dashsd"),n=e.find(a=>a.name==="hlsfairplayhd"),s=e.find(a=>a.name==="hlsfairplaysd"),r=e;return t&&i&&(r=r.filter(a=>a.name!=="dashsd")),n&&s&&(r=r.filter(a=>a.name!=="hlsfairplaysd")),r.map(a=>({type:eg(a.name),licenseServers:a.licenses.map(l=>({url:l.uri.href,type:l.type.toLocaleLowerCase(),certificate:l.certificate})),sources:a.sources.map(l=>({url:l.url,isYospace:l.isYospace,npawProfileName:l.npawProfileName}))})).filter(a=>a.type!==void 0)},Jf=(e,t)=>sr(e,[{key:"platform",value:t.platform||""},{key:"mediaid",value:t.mediaId||"",exact:!1}]),eg=e=>{let t=e.toLocaleLowerCase();if(t.startsWith("hls"))return se.Hls;if(t.startsWith("dash"))return se.Dash;if(t==="progressive")return se.Progressive};function tg(e,t){let i=[se.Hls,se.Dash,se.Progressive],n=re("capability.findMostSuitableManifest");n.debug("Applicable capabilities found",t.capabilities);let s=[];for(let r of i){if(n.trace(`Try stream type priority for "${r}"`),!t.capabilities.manifestTypes.includes(r)){n.trace(`Skip unsupported stream type "${r}"`);continue}let a=e.find(l=>l.type===r);if(a){n.trace(`Filter license servers for "${r}"`);let l=ig(a,t,n);if(l)return l;s.push(a)}}throw s.length>
6620?w("Requested DRM key systems not available!",{manifests:s,clientSupport:t},E.NO_DRM_OPTION_AVAILABLE_ANY_MORE_32110):w("Could not determine a suitable manifest for this client and player combination!",{manifestConfigurations:e,capabilities:t.capabilities},E.NO_MANIFESTS_PLAYABLE_32210)}function ig(e,t,i){let n={...e,licenseServers:(e.licenseServers||[]).filter(s=>t.capabilities.keySystems.includes(s.type))};if((e.licenseServers||[]).length>0&&n.licenseServers.length===0){i.debug("Requested DRM key systems not available!",{manifestConfiguration:e,licenseServers:e.licenseServers,clientSupport:t});return}return n}var ng=(e,t)=>{let i=!e||typeof e=="string"?{}:e;return{playerRequiresLoadBeforeReady:i.playerRequiresLoadBeforeReady??gl(),enableBolaAbr:i.enableBolaAbr??t.settings?.abr?.bola??!1,hasAacCodecSupport:i.hasAacCodecSupport??!(pl()&&Fp()),hasZeroStartTimeIssue:i.hasZeroStartTimeIssue??(tr()||an()),mustCheckUserActivation:i.mustCheckUserActivation??ml()}};function sg(e,t,i){if(![t.plugins?.["foundation.plugin.concurrentStreamCheck"]?.enabled,i.concurrentStreamCheck?.enable,!1].find(u=>u!=null))return;let{startUrl:s,stopUrl:r,heartbeatUrl:a,beatInterval:l}=i.concurrentStreamCheck||{};!s||!r||!a||(e["foundation.plugin.concurrentStreamCheck"]={enabled:!0,startUrl:s,stopUrl:r,heartbeatUrl:a,beatInterval:l})}var Ee=e=>!!e?.enabled;function rg(e,t,i){let n;switch(t.contentType){case"vod":n=i.entitlement?.vod;break;case"live":n=i.entitlement?.livestream;break;case"event":n=i.entitlement?.liveevent;break}if(!n?.check?.enable||!n?.check?.endpoint)return;let s=Ml(t),r={enabled:!0,headers:{"X-Device-Type":Al(s)},...t.plugins?.["foundation.plugin.entitlement"]};Ee(r)&&(e["foundation.plugin.entitlement"]={...r,endpoint:n.check.endpoint})}function ag(e,t){t.contentId;let i=t.plugins?.["foundation.plugin.googleAnalytics4"]||{enabled:!1};Ee(i)&&(e["foundation.plugin.googleAnalytics4"]={...i,id:i.id||t.contentId,firstPublicationDate:i.firstPublicationDate||t.contentMetadata?.firstPublicationDate,lastPublicationDate:i.lastPublicationDate||t.contentMetadata?.lastPublicationDate})}function og(e,t,i){let n=re("foundation.plugin.heartbeat"),s=i.heartbeat,r={enabled:s?.enable,...t.plugins?.["foundation.plugin.heartbeat"]};if(!r.enabled||t.contentType===W.Advertisement)return;let a=r.offer||s?.offer,l=r.videoService||s?.videoService;if(!a||!l||!s?.endpoints){n.error("Heartbeat config is missing required fields",{offer:a,videoService:l,endpoints:s?.endpoints});return}let u;switch(t.contentType){case"vod":u=s.endpoints.vod;break;case"live":u=s.endpoints.live;break;case"event":u=s.endpoints.event;break;case"fast":u=s.endpoints.fast;break}Ee(r)&&u&&(e["foundation.plugin.heartbeat"]={...r,id:r.id||t.contentId,endpoint:u,offer:a,videoService:l})}function lg(e,t,i){if(!$s("mediaSession")||!ne())return;let n=t.plugins?.["foundation.plugin.mediaSession"];(Ee(n)||i?.enabled&&n?.enabled!==!1)&&(e["foundation.plugin.mediaSession"]={enabled:!0,headline:n?.headline||t.contentMetadata?.headline,secondaryHeadline:n?.secondaryHeadline||t.contentMetadata?.secondaryHeadline,posterUrl:n?.posterUrl||t.contentMetadata?.posterUrl})}async function cg(e){let{pluginConfigs:t,loadRequest:i,remoteConfig:n,nielsenRequestHeader:s,deviceType:r}=e;if(i.contentType==="fast"||r===k.Vega)return;let a=re("foundation.plugin.nielsen"),l=n.nielsen;if(!l?.enable)return;if(!l.endpoint||!l.apid||!l.clientId){a.error("Nielsen config is missing required fields");return}let u={enabled:!0,...i.plugins?.["foundation.plugin.nielsen"]};if(Ee(u)){let o={app_id:l.apid,client_id:l.clientId,video_id:u.id||i.contentId,stream_type:i.contentType,commentpfad:u.commentPath},c=await ug(o,l.endpoint,s,a);if(!c)return;t["foundation.plugin.nielsen"]={...u,appId:l.apid,id:u.id||i.contentId,debug:l.debug,metadata:c}}}async function ug(e,t,i,n){let s=Object.entries(e),r=new URL(t);for(let[a,l]of s)l&&r.searchParams.append(a,l);try{let a=await Ze(r.toString(),{headers:i}),l=await a.json();if(a.status>=400){n.error("Endpoint request failed",a.status,l);return}return l}catch(a){n.error("Could not fetch nielsen metadata",a)}}function dg(e){let{pluginConfigs:t,loadRequest:i,remoteConfig:n,evaluatedClientSupport:s,stusRequestDebugInformation:r,stusResponseDebugInformation:a,advertisingServiceRequestDebugInformation:l,advertisingServiceResponseDebugInformation:u}=e,o=i.plugins?.["foundation.plugin.npaw"]?.accountCode||n.npawAnalytics?.accountCode||"rtlgermanydev",c={enabled:n.npawAnalytics?.enable??!0,...i.plugins?.["foundation.plugin.npaw"]};Ee(c)&&c.enabled&&(t["foundation.plugin.npaw"]={...c,enabled:!0,userId:c.userId||i.user?.userId,userType:c.userType||i.user?.userType,appName:c.appName||n.npawAnalytics?.appName,accountCode:o,loadRequest:i,remoteConfig:n,evaluatedClientSupport:s,stusRequestDebugInformation:r,stusResponseDebugInformation:a,advertisingServiceRequestDebugInformation:l,advertisingServiceResponseDebugInformation:u})}function hg(e,t,i){if(Ee(t)&&t.enabled){let n=i||t.playlist;if(!n)return;e["foundation.plugin.shortsUi"]={playlist:n,...t}}}function pg(e,t,i){let n=t.plugins?.["foundation.plugin.smartclip"]||{},s=ne()?.MoltenBundle,r=s&&typeof s=="object"&&"Video"in s&&typeof s.Video=="object"&&s.Video;if(!n.smartclipConfig&&r&&"getSmartClientCoreAdvertisingConfig"in r&&typeof r.getSmartClientCoreAdvertisingConfig=="function"){let a=r.getSmartClientCoreAdvertisingConfig();a&&typeof a=="object"&&(n.smartclipConfig=a)}
662if(!n.qualitySettings&&r&&"getQualitySettings"in r&&typeof r.getQualitySettings=="function"){let a=r.getQualitySettings();a&&typeof a=="object"&&(n.qualitySettings=a)}i.length>0&&n.enabled!==!1&&(n.adSlots=i,n.enabled=!0),Ee(n)&&(e["foundation.plugin.smartclip"]=n)}function fg(e,t,i){let n={enabled:t.plugins?.["foundation.plugin.streamFallback"]?.enabled??i.fallback?.inStream?.enable??!0};Ee(n)&&(e["foundation.plugin.streamFallback"]=n)}var Cl=e=>[W.Vod,W.Live,W.Event,W.Fast,W.Advertisement].includes(e.contentType)?"video":"audio";function gg(e,t,i,n){if(Ee(i)&&i.enabled){let s=n||i.playlist,r="other";pl()?r="android":(fl()||gl())&&(r="ios"),e["foundation.plugin.ui"]={...i,playlist:s,look:{...i.look,mode:i.look?.mode??Cl(t)},platform:r}}}function mg(e,t,i){let n=t.plugins?.["foundation.plugin.vast4"]||{},s=ne()?.MoltenBundle,r=s&&typeof s=="object"&&"Video"in s&&typeof s.Video=="object"&&s.Video;if(!n.qualitySettings&&r&&"getQualitySettings"in r&&typeof r.getQualitySettings=="function"){let a=r.getQualitySettings();a&&typeof a=="object"&&(n.qualitySettings=a)}i.length>0&&n.enabled!==!1&&(n.adSlots=i,n.enabled=!0),Ee(n)&&(e["foundation.plugin.vast4"]=n)}var bg=[k.Tablet,k.Desktop,k.Mobile];function yg(e,t,i){let n=t.plugins?.["foundation.plugin.visibility"],s={enabled:n?.enabled??!0,pauseAds:n?.pauseAds??!0,pauseContent:n?.pauseContent??!1};!s.pauseAds&&!s.pauseContent||!ol("IntersectionObserver")||!Le("addEventListener")||!Le("removeEventListener")||bg.includes(i)&&Ee(s)&&(e["foundation.plugin.visibility"]=s)}function vg(e,t,i,n){if(!n.sources.some(r=>r.isYospace))return;let s={...t.plugins?.["foundation.plugin.yospace"]};if(s.enabled=s.enabled??i.ssai?.enable,Ee(s)){let r=!1;Array.isArray(i.ssai?.enableYospaceSdkForSourceTypes)&&(r=i.ssai.enableYospaceSdkForSourceTypes.includes(t.contentType)),e["foundation.plugin.yospace"]={...s,useYospaceSdk:r,ang_bundle:s.ang_bundle||i.ssai?.angBundle,ang_ref:s.ang_ref||i.ssai?.angRef,fetchAtvIdTimeoutInMs:i.advertisement?.timeouts?.atv,deviceModel:er(),deviceVendor:Bp(),osName:on(),osVersion:hl()}}}async function Il(e){let{player:t,playlist:i,loadRequest:n,deviceType:s,clientSupport:r,getRequestHeader:a,possibleUiPluginConfig:l,possibleShortsPluginConfig:u}=e,o,c,d=re("evaluate-load-request"),h=[W.Live,W.Event,W.Fast,W.Radio];n.stopPlayingAtPaywallLimitInSeconds!==void 0&&(h.includes(n.contentType)?(d.warn(`stopPlayingAtPaywallLimitInSeconds is not supported for content type "${n.contentType}". Ignoring the paywall limit.`),n.stopPlayingAtPaywallLimitInSeconds=void 0):n.stopPlayingAtPaywallLimitInSeconds<=1&&(d.warn(`stopPlayingAtPaywallLimitInSeconds must be greater than 1, got ${n.stopPlayingAtPaywallLimitInSeconds}. Ignoring the paywall limit.`),n.stopPlayingAtPaywallLimitInSeconds=void 0));let f=t.getDebugInterface(),g=await Gf(n.remoteConfig,t.timeouts.remoteConfigRequest),p=ng(n.tweaks,g),y=n.manifests||[],m=[],b=Qf(n,g,s);f.stusRequestDebugInformation=b.requestDebugInformation;let v=Nf(n,g);f.advertisingServiceRequestDebugInformation=v.requestDebugInformation;let T=Ff(n,g);f.metadataServiceRequestDebugInformation=T.requestDebugInformation;let L,M,D,j=v.enable&&v.url?Mf(v.url,f.advertisingServiceRequestDebugInformation,t.timeouts.advertisingServiceRequest,{}).catch(ee=>{}):Promise.resolve(void 0),R=T.enable&&T.url?Vf(T.url,f.metadataServiceRequestDebugInformation,t.timeouts.metadataServiceRequest).catch(ee=>{}):Promise.resolve(void 0);if([M,D]=await Promise.all([j,R]),M&&(f.advertisingServiceRequestDebugInformation=M.requestDebugInformation,f.advertisingServiceResponseDebugInformation=M.responseDebugInformation,M.adSlots.length>0&&(m=M.adSlots)),D){f.metadataServiceRequestDebugInformation=D.requestDebugInformation,f.metadataServiceResponseDebugInformation=D.responseDebugInformation,n.contentMetadata=n.contentMetadata??{};let ee=Object.entries(D.metadata);for(let[G,Fe]of ee)Fe&&(n.contentMetadata[G]=Fe)}let B=y.length>0&&b.externalUrlAllowed;if(b.url&&!B){let ee={};a&&(ee=await a(pi.StUS)||{}),L=await Kf(b.url,f.stusRequestDebugInformation,t.timeouts.streamingUrlServiceRequest,ee).cat
662ch(G=>{o=fi(G)?G:w("Failed to fetch StUS manifest!",{caughtError:G},E.STUS_UNAVAILABLE_41800)}),L&&(f.stusRequestDebugInformation=L.requestDebugInformation,f.stusResponseDebugInformation=L.responseDebugInformation,y=L.manifests,n.thumbnailsUrl=L.thumbnailUrl||n.thumbnailsUrl,L.textTracks&&L.textTracks.length>0&&(n.textTracks=L.textTracks))}y.length===0?o=o??w("No manifests provided!",{},E.VIDEOSOURCES_CONFIG_34200):c=tg(y,r);let I={},N=a?await a(pi.Nielsen)||{}:{},H="foundation.plugin.smartclip",O=n.plugins?.["foundation.plugin.smartclip"],U=n.plugins?.["foundation.plugin.vast4"],q=O&&O.enabled!==!1,C=U&&U.enabled!==!1;if(q&&C)throw w("Smartclip and Vast4 plugins cannot be enabled at the same time!",{smartclipConfig:O,vast4Config:U},E.PLAYERCONFIG_PROBLEM_34000);(C||s===k.Kepler)&&(H="foundation.plugin.vast4"),pg(I,n,H==="foundation.plugin.smartclip"?m:[]),mg(I,n,H==="foundation.plugin.vast4"?m:[]),rg(I,n,g),lg(I,n,l),yg(I,n,s),dg({pluginConfigs:I,loadRequest:n,remoteConfig:g,evaluatedClientSupport:r,stusRequestDebugInformation:L?.requestDebugInformation,stusResponseDebugInformation:L?.responseDebugInformation,advertisingServiceRequestDebugInformation:M?.requestDebugInformation,advertisingServiceResponseDebugInformation:M?.responseDebugInformation}),gg(I,n,l,i),hg(I,u,i),og(I,n,g),ag(I,n),sg(I,n,g),fg(I,n,g),await cg({pluginConfigs:I,loadRequest:n,remoteConfig:g,nielsenRequestHeader:N,deviceType:s}),c&&vg(I,n,g,c);let K=t.getPlugin("foundation.plugin.ui")||t.getPlugin("foundation.plugin.shortsUi")||t.hasPreloadedPlugin("foundation.plugin.ui")||t.hasPreloadedPlugin("foundation.plugin.shortsUi")||I["foundation.plugin.ui"]||I["foundation.plugin.shortsUi"];K&&I["foundation.plugin.smartclip"]&&(I["foundation.plugin.smartclip"].handleClickThrough=!1),K&&I["foundation.plugin.vast4"]&&(I["foundation.plugin.vast4"].handleClickThrough=!1),I["foundation.plugin.shortsUi"]&&I["foundation.plugin.npaw"]&&(I["foundation.plugin.npaw"].shortsPlayer=!0);let X=[],ue=s===k.Chromecast,Q=s===k.Vega;switch(!0){case ue:{X.push("@foundation-player/player-chromecast");break}case Q:{X.push("@foundation-player/player-vega");break}case c?.type===se.Dash:X.push("@foundation-player/player-dashjs")}
662return I["foundation.plugin.smartclip"]&&X.push("@foundation-player/plugin-smartclip"),I["foundation.plugin.vast4"]&&X.push("@foundation-player/plugin-vast4"),I["foundation.plugin.npaw"]&&X.push("@foundation-player/plugin-npaw"),I["foundation.plugin.ui"]&&X.push("@foundation-player/plugin-ui"),I["foundation.plugin.shortsUi"]&&X.push("@foundation-player/plugin-shorts"),I["foundation.plugin.yospace"]&&X.push("@foundation-player/plugin-yospace"),{modules:X,manifestConfiguration:c,pluginConfigs:I,tweaks:p,error:o}}function Ll(e){if(e.vttTextTracks===void 0)return e;let{vttTextTracks:t,...i}=e;return i.textTracks===void 0&&(i.textTracks=t.map(n=>({type:Gs.Vtt,url:n.vttUrl,language:n.language,label:n.label}))),i}async function Eg(e,t){let i=Ll(t);if(e.state.value.state==="destroyed")throw w("Player is destroyed",{player:e,loadRequest:i},E.PLAYER_ALREADY_DESTROYED_35100);let n=e,s=ne()?.foundation?.internal_deviceType;if(!s)throw w("Device type is not defined in window",{},E.PLAYER_DEPENDENCY_INVALID_52130);let r=n.getDebugInterface();r.providedLoadRequests.push(i);let a=ne()?.foundation?.internal_clientSupport;if(!a)throw w("ClientSupport is not defined in window",{},E.PLAYER_DEPENDENCY_INVALID_52130);let{modules:l,manifestConfiguration:u,pluginConfigs:o,tweaks:c,error:d}=await Il({player:n,loadRequest:i,deviceType:s,clientSupport:a,getRequestHeader:n.getRequestHeader});if(d)throw await n.triggerError(d),d;if(!u)throw await n.triggerError(w("INVARIANT: No manifest available without error")),d;let h=await n.moduleLoader(l);r.evaluatedPluginConfiguration=o;let{plugins:f,playerAdapters:g}=kl(n,{remotePlayback:n.remotePlayback,loadRequest:i,mountPoint:n.mountPoint,getRequestHeader:n.getRequestHeader,moduleLoader:n.moduleLoader,playerId:e.getPlayerId(),manifestConfiguration:u,deviceType:s,pluginConfigs:o,resolvedModules:h,tweaks:c}),p=nn(),y=e.state.once(({state:b,error:v})=>b==="error"&&v!==void 0,({error:b})=>{p.resolve(Qi(b))}),m=await Promise.race([n.loadManifestConfiguration({plugins:f,playerAdapters:g,manifestConfiguration:u,pluginConfigs:o,loadRequest:i}).catch(b=>b),p.promise]);if(y(),m)throw m}async function wg(e,t){let i=ne()?.foundation?.api;return i?.internal_loadMedia?i.internal_loadMedia(e,t):Eg(e,t)}var Ji="data-foundation-player",Pl=e=>typeof e?.getAttribute=="function"&&typeof e.setAttribute=="function"&&typeof e.removeAttribute=="function",Sg=(e,t)=>{if(!Pl(e))return;let i=e.getAttribute(Ji);if(i!==null)throw w('The "mountPoint" given to "createPlayer()" already hosts a player instance. A mount point can only host one player at a time. Await "player.destroy()" of the existing instance before you create a new player, or use a separate element.',{existingPlayerId:i,playerId:t},E.PLAYERCONFIG_PROBLEM_34000);e.setAttribute(Ji,t)},Tg=(e,t)=>{Pl(e)&&e.getAttribute(Ji)===t&&e.removeAttribute(Ji)},kg=class{constructor(){this.listeners=new Map}addEventListener(e,t){let i=this.listeners.get(e);return i||(i=new Set,this.listeners.set(e,i)),i.add(t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){let i=this.listeners.get(e);i&&(i.delete(t),i.size===0&&this.listeners.delete(e))}async dispatchEvent(e,t){let i=this.listeners.get(e);if(!i)return;let n=[];for(let s of i){let r=s(t);r instanceof Promise&&n.push(r)}await Promise.all(n)}destroy(){this.listeners.clear()}};function Ag(e){let t;try{t=JSON.parse(e)}catch(s){return{cues:[],errors:[new Error(`Transcript is not valid JSON: ${s}`)]}}if(!Array.isArray(t))return{cues:[],errors:[new Error("Transcript does not contain a list of segments")]};let i=[],n=[];return t.forEach((s,r)=>{if(!Cg(s)){n.push(new Error(`Segment at index ${r} is not a valid transcript segment`));return}i.push({startTime:s.start,endTime:s.end,text:s.text.trim()})}),{cues:i,errors:n}}function Cg(e){if(typeof e!="object"||e===null)return!1;let{start:t,end:i,text:n}=e;return Number.isFinite(t)&&Number.isFinite(i)&&typeof n=="string"}async function Ig(e,t=2e3){let i=re("foundation.core.thumbnails"),n=new URL(e,tn()?.href);n.pathname=n.pathname.split("/").slice(0,-1).join("/");let s=n.href;return await Ze(e,{timeout:t}).then(async a=>{if(a.status!==200)return i.warn(`Thumbnail URL returned status code ${a.status}`),[];let l=await a.text(),{cues:u,errors:o}=await qi(l);return o.length>0&&i.warn("Error parsing thumbnail WebVTT",o),u.map(({startTime:c,endTime:d,text:h})=>({startTimeInSeconds:c,endTimeInSeconds:d,image:Lg(s,h)}))}).catch(a=>(i.warn("Thumbnails could not be retrieved",a),[]))}function Lg(e,t){let i="xywh",[n,s]=t.split("#xywh="),r=Pg(e,n),a=s.split(",").map(Number.parseFloat).reduce((l,u,o)=>{let c=i[o];return l[c]=u,l},{});return{url:r,coords:a}}function Pg(e,t){return`${e.replace(/\/$/,"")}/${t.replace(/^\//,"")}`}
662var pt={PlayerAdapter:0,Virtual:1},Rg=class{constructor(e){this.getRequestHeader=()=>Promise.resolve({}),this.playerAdapters=[],this.plugins=[],this.eventBus=new kg,this.logger=re("player"),this.publicPlugins=new Map,this.thumbnails=[],this.cancelledAutoplayViaPause=!1,this.tryingAutoplay=!1,this.paywallHandlerActive=!1,this.virtualTextTracks=[],this.textTrackMode=pt.PlayerAdapter,this.textTrackCueCache={},this.stallingDebounce=void 0,this.uncheckedTweaks=void 0,this.storedLoadManifestConfigurationOptions=void 0,this.playlist=void 0,this.playerWasPreloaded=!1,this.destroyed=!1,this.destroyedPlayerAdapters=new WeakSet,this.addEventListener=(r,a)=>this.eventBus.addEventListener(r,a),this.removeEventListener=(r,a)=>this.eventBus.removeEventListener(r,a),this.dispatchEvent=(r,a)=>this.eventBus.dispatchEvent(r,a),this.loadVirtualTextTracks=async r=>{if(r?.textTracks===void 0||r.textTracks.length===0)return[];let a=r.textTracks.map(async u=>({...u,cues:await this.loadTextTrackForTrack(u)})),l=(await Promise.allSettled(a)).filter(u=>u.status==="fulfilled").map(u=>u.value);for(let u=0;u<l.length;u++){let o=l[u];this.virtualTextTracks.push({trackId:String(u),language:o.language,cues:o.cues,label:zs(o.language,o.label),active:!1})}return this.virtualTextTracks.map(u=>({trackId:u.trackId,language:u.language,label:u.label,active:u.active}))};let{playerId:t,getRequestHeader:i,moduleLoader:n,playlist:s}=e;this.playerId=t,this.debugInterface=e.debugInterface,this.deviceType=e.deviceType,this.timeouts=e.timeouts,i&&(this.getRequestHeader=i),this.moduleLoader=n,this.mountPoint=e.mountPoint,this.remotePlayback=e.remotePlayback,this.generatedVideoElement=e.generatedVideoElement,this.state=new ll({autoplaySupported:!1,maxVideoBitrateInKbps:-1,muted:!1,playbackRate:1,startMethod:"not-started",state:"loading",sessionId:"",volume:1,droppedFrames:0,averageThroughputInKbps:0,currentTimeInSeconds:0,contentWatchTimeInSeconds:0,totalContentWatchTimeInSeconds:0,sessionStarted:!1,contentStarted:!1,contentCompleted:!1,sessionCompleted:!1,adActive:!1,linearAdActive:!1,metrics:{},contentId:"",contentType:W.Vod,activeCues:[],preparePlaying:!1,timeShiftedInSeconds:0,sourceStatus:[]}),this.state.onValueChange("state",({state:r,loop:a})=>{if(a&&r==="ended"){let l=0;typeof a=="object"&&(l=a.startTimeInSeconds,this.dispatchEvent("player:looped",{})),this.replay({startTimeInSeconds:l}).catch(u=>{this.logger.error("Failed to replay the looped content",u)})}}),this.state.onValueChange("currentTimeInSeconds",async({currentTimeInSeconds:r,linearAdActive:a,contentWatchTimeInSeconds:l,totalContentWatchTimeInSeconds:u,loop:o},c)=>{if(a)return;o&&typeof o=="object"&&o.endTimeInSeconds&&r>o.endTimeInSeconds&&(this.seekTo(o.startTimeInSeconds),this.dispatchEvent("player:looped",{})),this.playerLoadRequest?.stopPlayingAtPaywallLimitInSeconds&&!this.paywallHandlerActive&&r>this.playerLoadRequest?.stopPlayingAtPaywallLimitInSeconds&&(this.paywallHandlerActive=!0,await this.pause(),await this.seekTo(this.playerLoadRequest?.stopPlayingAtPaywallLimitInSeconds),this.dispatchEvent("player:paywallReached",{}),this.paywallHandlerActive=!1);let d=Math.max(r-c,0);d>1||this.state.patch({contentWatchTimeInSeconds:l+d,totalContentWatchTimeInSeconds:u+d})}),s&&(this.playlist=s,s.connect(this))}getPlayerId(){return this.playerId}async play(){if(this.destroyed){this.logger.debug("Ignoring play request, because the player was destroyed");return}if(this.state.value.state==="waiting"&&this.storedLoadManifestConfigurationOptions)return this.loadManifestConfiguration(this.storedLoadManifestConfigurationOptions);if(this.state.value.state==="playing"||this.state.value.state==="ended"||this.state.value.sessionCompleted)return;if(!this.activePlayerAdapter)throw w("No active player adapter found");if(this.playerLoadRequest?.stopPlayingAtPaywallLimitInSeconds&&this.state.value.currentTimeInSeconds>=this.playerLoadRequest.stopPlayingAtPaywallLimitInSeconds)return;this.state.patch({preparePlaying:!0}),this.logger.debug("Checking with advertising plugin if play is allowed");let e=await this.advertisingPlugin?.beforePlay();if(this.logger.debug("Advertising plugin play check result",{isAllowed:e}),e===!1){this.state.patch({preparePlaying:!1});return}if(this.destroyed){this.logger.debug("Aborting play request, because the player was destroyed"),this.state.patch({preparePlaying:!1});return}let t=performance.now(),i=this.state.value.startMethod;try{this.logger.debug("Starting playback on active player adapter"),await this.activePlayerAdapter.play(),this.logger.debug("Started playback on active player adapter")}catch(u){throw this.tryingAutoplay=!1,this.state.patch({preparePlaying:!1}),u}if(this.destroyed){this.logger.debug("Discarding play result, because the player was destroyed"),this.tryingAutoplay=!1,this.state.patch({preparePlaying:!1});return}let s=performance.now()-t,r=this.state.value.linearAdActive,a=this.state.value.metrics,l=this.state.value.contentStarted;!l&&!r&&(l=!0),i==="not-started"&&this.logger.debug("Media Play metrics",{metrics:{...a,mediaPlayInMs:s}}),this.tryingAutoplay=!1,this.state.patch({state:"playing",metrics:a,sessionStarted:!0,contentStarted:l,preparePlaying:!1})}async pause(){if(this.destroyed||(this.state.value.startMethod==="not-started"&&(this.cancelledAutoplayViaPause=!0),this.state.value.state==="waiting"||this.state.value.state==="loading"||this.state.value.state==="ready"||this.state.value.state==="paused"||this.state.value.state==="stopped"||this.state.value.state==="error"||this.state.value.state==="ended"))return;if(!this.activePlayerAdapter)throw w("No active player adapter found");!this.state.value.activeAsset||await this.advertisingPlugin?.beforePause()===!1||(await this.activePlayerAdapter.pause(),this.state.patch({state:this.state.value.activeAsset.livestream?"stopped":"paused"}))}async mute(){this.activePlayerAdapter&&await this.activePlayerAdapter.mute(),this.state.patch({muted:!0}
662)}async unmute(){this.activePlayerAdapter&&await this.activePlayerAdapter.unmute(),this.state.patch({muted:!1})}async setVolume(e){this.activePlayerAdapter&&await this.activePlayerAdapter.setVolume(e),this.state.patch({volume:e})}async seekTo(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(e<0)throw w("You cannot seek to a negative offset",{offsetInSeconds:e},E.OPERATION_NOT_SUPPORTED_35500);if(typeof this.playerLoadRequest?.loop=="object"&&(e<this.playerLoadRequest.loop.startTimeInSeconds||this.playerLoadRequest.loop.endTimeInSeconds&&e>this.playerLoadRequest.loop.endTimeInSeconds))throw w("You cannot seek to an offset outside of the loop start and end",{offsetInSeconds:e,loop:this.playerLoadRequest.loop},E.OPERATION_NOT_SUPPORTED_35500);if(this.state.value.sessionCompleted)return;let t=this.state.value.activeAsset;if(!t)return;if(t.livestream)throw w("Seek was called on a livestream, which is not supported!",{},E.OPERATION_NOT_SUPPORTED_35500);if(await this.advertisingPlugin?.beforeSeek()===!1)return;let n=this.playerLoadRequest?.stopPlayingAtPaywallLimitInSeconds??t.durationInSeconds-1,s=Math.min(e,n);s!==e&&this.logger.warn(`The requested seek time of ${e}s was out of bounds, clamping to ${s}s`);let r=this.state.value.state;this.state.patch({state:"seeking"}),await this.activePlayerAdapter.seekTo(s),this.state.patch({state:r,currentTimeInSeconds:s})}async setPlaybackRate(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");await this.advertisingPlugin?.beforePlaybackRate(e)!==!1&&(await this.activePlayerAdapter.setPlaybackRate(e),this.state.patch({playbackRate:e}))}async setAudioTrack(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset)return Promise.resolve();await this.activePlayerAdapter.setAudioTrack(e);let t=this.state.value.activeAsset.audioTracks.map(i=>({...i,active:i.trackId===e}));this.state.patch({activeAsset:{...this.state.value.activeAsset,audioTracks:t},currentAudioTrack:t.find(i=>i.trackId===e)})}async enableTextTrack(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset)return Promise.resolve();this.textTrackMode===pt.PlayerAdapter?await this.activePlayerAdapter.enableTextTrack(e):await this.enableVirtualTextTrack(e);let t=this.state.value.activeAsset.textTracks.map(i=>({...i,active:i.trackId===e}));this.state.patch({activeAsset:{...this.state.value.activeAsset,textTracks:t},currentTextTrack:t.find(i=>i.trackId===e),activeCues:this.activePlayerAdapter.state.value.activeCues})}enableVirtualTextTrack(e){for(let t of this.virtualTextTracks)t.active=t.trackId===e;return this.virtualTextTrackSubscription||(this.virtualTextTrackSubscription=this.state.onValueChange("currentTimeInSeconds",({currentTimeInSeconds:t,activeCues:i})=>{let n=this.virtualTextTracks.find(r=>r.active);if(!n)return;let s=n.cues.reduce((r,a)=>(a.startTimeInSeconds>t||a.endTimeInSeconds<=t||r.push({id:a.id,startTimeInSeconds:a.startTimeInSeconds,endTimeInSeconds:a.endTimeInSeconds,text:a.text}),r),[]);i.length===0&&s.length===0||this.state.patch({activeCues:s})})),Promise.resolve()}async disableTextTrack(){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset)return Promise.resolve();this.virtualTextTrackSubscription&&(this.virtualTextTrackSubscription(),this.virtualTextTrackSubscription=void 0),await this.activePlayerAdapter.disableTextTrack(),this.state.patch({activeAsset:{...this.state.value.activeAsset,textTracks:this.state.value.activeAsset.textTracks.map(e=>({...e,active:!1}))},currentTextTrack:void 0,activeCues:[]})}getThumbnail(e){return this.thumbnails.find(({startTimeInSeconds:t,endTimeInSeconds:i})=>e>=t&&e<i)?.image}async setMaxVideoBitrate(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");await this.activePlayerAdapter.setMaxVideoBitrate(e),this.state.patch({maxVideoBitrateInKbps:e})}hasPlayerAdapter(e){return this.playerAdapters.find(t=>t.getPlayerType()===e)!==void 0}hasPlugin(e){return this.plugins.find(t=>t.getKey()===e)!==void 0}hasPreloadedPlugin(e){return this.storedLoadManifestConfigurationOptions?.plugins.some(t=>t.getKey()===e)??!1}getAdvertisingPlugin(){return this.advertisingPlugin}
662setAdvertisingPlugin(e){this.advertisingPlugin=e,this.advertisingPlugin.state.onValueChange("adActive",({adActive:t,linearAdActive:i})=>{this.state.patch({adActive:t,linearAdActive:i})})}getPlugin(e){let t=this.plugins.find(i=>i.getKey()===e);if(t)return t}setMetadata(e){this.state.patch(e),this.activePlayerAdapter&&this.activePlayerAdapter.updateContentMetadata(e)}async destroy(e){this.destroyed||(this.logger.debug("Starting to destroy player",{cause:e}),this.destroyed=!0,this.generatedVideoElement&&(this.mountPoint.removeChild(this.generatedVideoElement),this.generatedVideoElement=void 0),Tg(this.mountPoint,this.playerId),typeof e=="string"?this.state.patch({state:"destroyed",destroyCause:e}):this.state.patch({state:"destroyed",destroyCause:e,error:e}),this.playerAdapterStateUnsubscribe?.(),this.playerAdapterStateUnsubscribe=void 0,this.virtualTextTrackSubscription?.(),this.virtualTextTrackSubscription=void 0,this.stallingDebounce&&(clearTimeout(this.stallingDebounce),this.stallingDebounce=void 0),this.beforeUnloadListener&&(ne()?.removeEventListener?.("beforeunload",this.beforeUnloadListener),ne()?.removeEventListener?.("pagehide",this.beforeUnloadListener),this.beforeUnloadListener=void 0),this.afterWindowRestoredListener&&(ne()?.removeEventListener?.("pageshow",this.afterWindowRestoredListener),this.afterWindowRestoredListener=void 0),await this.destroyPlayerAdapters())}async destroyPlayerAdapters(e=this.playerAdapters){let t=[];for(let i of[...e]){let n=this.playerAdapters.indexOf(i);n!==-1&&this.playerAdapters.splice(n,1),!this.destroyedPlayerAdapters.has(i)&&(this.destroyedPlayerAdapters.add(i),t.push(i))}await Promise.all(t.map(i=>i.destroy()))}createDestroyedError(e){return w(`The player was destroyed while "${e}" was in flight`,{operation:e,destroyCause:this.state.value.destroyCause},E.PLAYER_ALREADY_DESTROYED_35100)}getDebugInterface(){return this.debugInterface}async switchContent(e){if(this.destroyed)throw this.createDestroyedError("switchContent");this.playerAdapterStateUnsubscribe?.(),this.virtualTextTracks=[],this.textTrackMode===pt.Virtual&&(this.virtualTextTrackSubscription?.(),this.virtualTextTrackSubscription=void 0),this.textTrackMode=pt.PlayerAdapter,this.state.patch({assetUrl:e.assetUrl,state:"loading"});let t=this.findSuitablePlayerAdapter(e);t!==this.activePlayerAdapter&&(this.activePlayerAdapter&&await this.activePlayerAdapter.beforeSwitchAdapter(),this.activePlayerAdapter=t);let i=this.state.value.muted,n=await this.canAutoplay(i).catch(c=>(this.logger.error("Autoplay detection failed, defaulting to no autoplay",c),!1)),s=await Ks([t.load(e)],{timeout:this.timeouts.loadRequest,trackVisibility:!0,rejectError:w("Load did not finish within 20 seconds",{},E.NETWORK_PROBLEM_31000)});if(fi(s))throw s;if(this.destroyed)throw this.createDestroyedError("switchContent");let r=s;this.subscribeToContentState(t);let a=r.videoTracks.find(c=>c.active);i?(this.logger.debug("Muting player adapter after content switch"),await this.mute()):(this.logger.debug("Unmuting player adapter after content switch"),await this.unmute()),this.logger.debug("Setting volume on player adapter after content switch",{volume:this.state.value.volume}),await this.setVolume(this.state.value.volume),e.contentType==="advertisement"&&this.state.value.playbackRate!==1?(this.logger.debug("Enforce playback rate of 1 for advertisements"),await this.setPlaybackRate(1)):(this.logger.debug("Setting playback rate on player adapter after content switch",{playbackRate:this.state.value.playbackRate}),await this.setPlaybackRate(this.state.value.playbackRate)),this.logger.debug("Setting max video bitrate on player adapter after content switch",{maxVideoBitrateInKbps:this.state.value.maxVideoBitrateInKbps}),await this.setMaxVideoBitrate(this.state.value.maxVideoBitrateInKbps);let l=this.limitAllowedAudioTracksIfNeeded(e.originalAudioAllowed,r.audioTracks);r.audioTracks=l;let u=this.getActiveOrFirstAudioTrack(l);if(u&&!u.active&&(await t.setAudioTrack(u.trackId),u.active=!0),e.textTracks&&e.textTracks.length>0)try{let c=await this.loadVirtualTextTracks(e);c.length>0&&(this.textTrackMode=pt.Virtual,r.textTracks=c)}catch(c){this.logger.error("Failed to load virtual text tracks",c)}this.state.patch({activeAsset:r,state:"ready",currentAudioTrack:u,currentTextTrack:r.textTracks.find(c=>c.active),currentVideoTrack:a,currentVideoBitrateInKbps:a?.bitrateInKbps||void 0,durationInSeconds:r.durationInSeconds});let o={assetInformation:r,canAutoplay:n};return this.logger.debug("Successfully switched content",o),o}async loadTextTrackForTrack(e){if(this.textTrackCueCache[e.url])return this.textTrackCueCache[e.url];let t=await fetch(e.url);if(t.status!==200)return Promise.reject(`Server returned status code ${t.status}`);let i=await t.text(),{cues:n,errors:s}=e.type===Gs.Audiorella?Ag(i):await qi(i);if(s.length>0&&this.logger.warn(`Error while parsing the ${e.type} text track`,s),n.length===0&&s.length>0)return Promise.reject(`Could not parse the file as ${e.type}`);let r=n.map((a,l)=>({id:String(l),text:a.text,startTimeInSeconds:a.startTime,endTimeInSeconds:a.endTime}));return this.textTrackCueCache[e.url]=r,r}getCuesForTextTrack(e){return this.textTrackMode===pt.Virtual?this.virtualTextTracks.find(i=>i.trackId===e)?.cues||[]:[]}limitAllowedAudioTracksIfNeeded(e,t){if(typeof e!="boolean"||e)return t;let i=t.filter(n=>n.language==="de");return i.length===0?t:i}getActiveOrFirstAudioTrack(e){let t=e.find(i=>i.active);return t||e[0]}async canAutoplay(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.playerLoadRequest)throw w("No active load request found");if(!this.playerLoadRequest.autoplay)return!1;if(Yi()?.hidden)return this.logger.debug("Skip autoplay test because document is hidden"),!1;if(this.state.value.startMethod!=="not-started")return!0;let t=this.deviceType===k.Desktop||this.deviceType===k.Mobile||this.deviceType===k.Tablet;if(!t)return this.logger.debug("Skip autoplay test because device does not require a check",{deviceType:this.deviceType,isWebDevice:t}),!0;this.logger.debug("Testing autoplay for active adapter",{activePlayerAdapter
662:this.activePlayerAdapter,isMuted:e});let i=this.getTweaks();return this.activePlayerAdapter.testAutoplay(e,i.hasAacCodecSupport,i.mustCheckUserActivation)}takeStateSnapshot(){if(!this.activePlayerAdapter)throw w("No active player adapter found");let e=this.activePlayerAdapter.getLoadRequest();if(!e)throw w("Cannot take snapshot without active load request!");let{currentTimeInSeconds:t,playbackRate:i,currentAudioTrack:n,currentTextTrack:s,activeAsset:r}=this.state.value;return{currentTimeInSeconds:r?.livestream?0:t,playbackRate:i,currentAudioTrackId:n?.trackId,currentTextTrackId:s?.trackId,loadRequest:{...e}}}async restoreStateSnapshot(e){let t;e.loadRequest.assetUrl!==this.state.value.assetUrl?t=(await this.switchContent({...e.loadRequest,startTimeInSeconds:e.currentTimeInSeconds})).assetInformation:(this.logger.debug("Restoring snapshot on same content, skipping content switch"),t=this.state.value.activeAsset);let{playbackRate:i,currentAudioTrack:n,currentTextTrack:s}=this.state.value;return e.playbackRate!==i&&await this.setPlaybackRate(e.playbackRate),e.currentAudioTrackId&&e.currentAudioTrackId!==n?.trackId&&await this.setAudioTrack(e.currentAudioTrackId),e.currentTextTrackId&&e.currentTextTrackId!==s?.trackId&&await this.enableTextTrack(e.currentTextTrackId),t}patchInitialSessionState(e){let{loadRequest:t,manifestConfiguration:i}=e,{playbackRate:n,muted:s,maxVideoBitrateInKbps:r}=this.state.value;this.state.silentPatch({title:void 0,program:void 0,channelName:void 0,season:void 0,headline:void 0,secondaryHeadline:void 0,firstPublicationDate:void 0,lastPublicationDate:void 0,posterUrl:void 0,linkToShare:void 0,linkOverlays:void 0,mediaShare:void 0,durationInSeconds:void 0,...t.contentMetadata,maxVideoBitrateInKbps:t.maxVideoBitrateInKbps||r,muted:t.muted??s,playbackRate:t.playbackRate||n,contentId:t.contentId,contentType:t.contentType,currentTimeInSeconds:0,contentWatchTimeInSeconds:0,sessionId:Sl(),sessionStarted:!1,contentStarted:!1,contentCompleted:!1,sessionCompleted:!1,adActive:!1,linearAdActive:!1,startMethod:"not-started",preparePlaying:!1,state:"loading",error:void 0,sourceStatus:i.sources.map(a=>({sourceUrl:a.url,active:!1,denyUntilTimestampInMs:this.state.value.sourceStatus.find(l=>l.sourceUrl===a.url)?.denyUntilTimestampInMs})),loop:t.loop,chapters:t.contentMetadata?.chapters,description:t.contentMetadata?.description})}async storeLoadManifestConfigurationOptionsForPreload(e){if(this.destroyed){this.logger.debug("Skipping preload, because the player was destroyed"),await this.destroyPlayerAdapters(e.playerAdapters);return}e.loadRequest={...e.loadRequest,autoplay:!0},this.playerWasPreloaded=!0,this.storedLoadManifestConfigurationOptions=e,this.patchInitialSessionState(e),this.state.silentPatch({state:"waiting"})}async loadManifestConfiguration(e){if(this.destroyed)throw await this.destroyPlayerAdapters(e.playerAdapters),this.createDestroyedError("loadManifestConfiguration");let{state:t,sessionStarted:i}=this.state.value;this.storedLoadManifestConfigurationOptions=void 0,i&&this.state.patch({sessionCompleted:!0}),t==="playing"&&await this.pause().catch(g=>{this.logger.error("Failed to pause before loading new content",g)});let{playerAdapters:n,plugins:s,manifestConfiguration:r,pluginConfigs:a}=e;for(let g of n)this.playerAdapters.push(g);for(let g of s)this.plugins.push(g),Ef(g)&&this.publicPlugins.set(g.getKey(),g);if(this.destroyed)throw await this.destroyPlayerAdapters(),this.createDestroyedError("loadManifestConfiguration");this.patchInitialSessionState(e),this.cancelledAutoplayViaPause=!1,this.paywallHandlerActive=!1;let l=e.loadRequest;this.playerLoadRequest=l;let u=await Promise.all(this.plugins.map(g=>g.beforeSessionStart(a,l))).then(()=>{}).catch(g=>g);if(u)throw await this.triggerError(u),u;if(this.destroyed)throw await this.destroyPlayerAdapters(),this.createDestroyedError("loadManifestConfiguration");let o=this.plugins.some(g=>g.beforeWindowUnload),c=!1;o&&(this.beforeUnloadListener=()=>{if(!c){c=!0;for(let g of this.plugins)if(g.beforeWindowUnload)try{g.beforeWindowUnload()}catch(p){this.logger.error("beforeWindowUnload hook failed for plugin",{plugin:g,error:p})}}},ne()?.addEventListener?.("beforeunload",this.beforeUnloadListener),ne()?.addEventListener?.("pagehide",this.beforeUnloadListener)),this.afterWindowRestoredListener=g=>{g.persisted&&(this.pause(),this.logger.debug("Queuing window restore hook"),setTimeout(()=>{c=!1,this.logger.debug("Executing window restore hook");for(let p of this.plugins)if(p.afterWindowRestored)try{p.afterWindowRestored()}catch(y){this.logger.error("afterWindowRestored hook failed for plugin",p,y)}},1e3))},ne()?.addEventListener?.("pageshow",this.afterWindowRestoredListener),this.thumbnails=[],this.playerLoadRequest.thumbnailsUrl&&(this.thumbnails=await Ig(this.playerLoadRequest.thumbnailsUrl).cat
662ch(g=>(this.logger.error("Thumbnails could not be parsed",g),[])));let d=async g=>{if(this.destroyed)throw this.createDestroyedError("loadManifestConfiguration");let p=performance.now();this.playerAdapterStateUnsubscribe?.();let y=r.sources[g];this.state.patch({state:"loading",sourceStatus:this.state.value.sourceStatus.map(j=>({...j,active:j.sourceUrl===y.url}))});let m=this.state.value.sourceStatus.find(j=>j.sourceUrl===y.url);if(m?.denyUntilTimestampInMs&&m.denyUntilTimestampInMs>Date.now())throw w(`Source URL ${m.sourceUrl} is in deny list until timestamp ${m.denyUntilTimestampInMs}ms`,m,E.CLIENT_30000);let b;if(r.licenseServers&&r.licenseServers.length>0){let j=await this.getRequestHeader(pi.DRM);b=r.licenseServers.map(R=>({keySystem:R.type,licenseServerUrl:R.url,certificateUrl:R.certificate,headers:{...R.headers||{},...j}}))}let v;this.isLivestreamContentType(l.contentType)||(typeof l.loop=="object"?v=l.loop.startTimeInSeconds:v=l.startTimeInSeconds);let T={contentType:l.contentType,manifestType:r.type,assetUrl:y.url,startTimeInSeconds:v,textTracks:l.textTracks,drmConfig:b,isYospace:y.isYospace,contentMetadata:l.contentMetadata};for(let j of this.plugins)T=await j.modifyLoadRequest(T);if(await Promise.all(this.plugins.map(j=>j.beforeLoadRequest(T))),this.destroyed)throw this.createDestroyedError("loadManifestConfiguration");let{canAutoplay:L}=await this.switchContent(T),D=performance.now()-p;this.state.patch({metrics:{...this.state.value.metrics,mediaLoadInMs:D}}),l.autoplay&&L&&!this.cancelledAutoplayViaPause&&(this.logger.debug("Autoplaying after loading manifest configuration"),this.tryingAutoplay=!0,await this.play())},h=0,f;for(;h<r.sources.length&&(f=await d(h).catch(g=>g),!(!f||this.destroyed));)this.logger.debug("Failed to load source, trying next one",{error:f,index:h,source:r.sources[h]}),await this.dispatchEvent("player:SuppressedError",Qi(f)),h+=1;if(this.destroyed)throw await this.destroyPlayerAdapters(),this.createDestroyedError("loadManifestConfiguration");if(f){this.logger.debug("Failed to switch content",{error:f});let g=await this.triggerError(f);if(g)throw g}if(this.playerLoadRequest.preferredAudioLanguage&&this.state.value.currentAudioTrack?.language!==this.playerLoadRequest.preferredAudioLanguage){let g=this.state.value.activeAsset?.audioTracks.find(p=>p.language===this.playerLoadRequest?.preferredAudioLanguage);g&&await this.setAudioTrack(g.trackId).catch(p=>{this.logger.error("Failed to set preferred audio track",p)})}if(this.playerLoadRequest.preferredTextTrackLanguage&&this.state.value.currentTextTrack?.language!==this.playerLoadRequest.preferredTextTrackLanguage){let g=this.state.value.activeAsset?.textTracks.find(p=>p.language===this.playerLoadRequest?.preferredTextTrackLanguage);g===void 0&&(g=this.state.value.activeAsset?.textTracks[0]),g&&await this.enableTextTrack(g.trackId).catch(p=>{this.logger.error("Failed to set preferred text track",p)})}this.playerLoadRequest.playbackRate&&this.state.value.playbackRate!==this.playerLoadRequest.playbackRate&&await this.setPlaybackRate(this.playerLoadRequest.playbackRate).catch(g=>{this.logger.error("Failed to set preferred playback rate",g)})}subscribeToContentState(e){if(this.playerAdapterStateUnsubscribe?.(),this.destroyed)return;let t=()=>{this.stallingDebounce&&(clearTimeout(this.stallingDebounce),this.stallingDebounce=void 0)},i=()=>{t(),this.stallingDebounce=setTimeout(()=>{this.triggerError(w("Player stalled for too long",{timeoutInMilliseconds:this.timeouts.stallingDebounce},E.NETWORK_PROBLEM_31000)),t()},this.timeouts.stallingDebounce)};this.playerAdapterStateUnsubscribe=e.state.subscribe(async n=>{if(this.destroyed)return;let s=this.state.value.state;if(s==="error")return;let r=this.state.value.contentCompleted,a=this.state.value.sessionCompleted,l=this.state.value.preparePlaying;if(n.state!=="stalled"&&t(),n.state==="error"&&n.error){let p=n.error.code>=E.FALLBACK_DRM_ERROR_10000.code&&n.error.code<E.CONTENT_20000.code,y=n.error.code>=E.CONTENT_20000.code&&n.error.code<E.CLIENT_30000.code,m=[E.NO_PLAYABLE_TRACK_LEFT_30100.code];if(p||y||m.includes(n.error.code)){await this.triggerError(n.error);return}}if(n.state==="ended"){s="ended";let p=this.state.value.linearAdActive,y=this.advertisingPlugin?.getAdSlotAtOffset(-1);r=r||!p,a=a||r&&!y}n.state==="stalled"&&s==="playing"&&(s="stalled",i());let u=this.state.value.startMethod;n.state==="playing"&&s!=="seeking"&&(s="playing",l=!1,u==="not-started"&&(u=this.tryingAutoplay&&!this.playerWasPreloaded?"autoplay":"user-interaction",this.logger.debug("Start method was changed",{nextValue:u})));let o=this.state.value.currentTextTrack,c=this.state.value.activeCues,d=this.textTrackMode===pt.Virtual?c:n.activeCues;!o&&d.length>0&&(d=c.length===0?c:[]);let h=this.state.value.activeAsset;h&&!h.livestream&&n.durationInSeconds!==h.durationInSeconds&&(h={...h,durationInSeconds:n.durationInSeconds});let f=this.state.value.durationInSeconds;h&&f!==h.durationInSeconds&&(f=h.durationInSeconds);let g=this.state.value.currentVideoTrack;h&&g?.trackId!==n.currentVideoTrack?.trackId&&(h={...h,videoTracks:h.videoTracks.map(p=>({...p,active:p.trackId===n.currentVideoTrack?.trackId}))}),this.state.patch({state:s,preparePlaying:l,contentCompleted:r,sessionCompleted:a,startMethod:u,currentTimeInSeconds:n.currentTimeInSeconds,timeShiftedInSeconds:n.timeShiftedInSeconds,currentVideoTrack:n.currentVideoTrack,
662currentVideoBitrateInKbps:n.currentVideoTrack?.bitrateInKbps,droppedFrames:n.droppedFrames,averageThroughputInKbps:n.averageThroughputInKbps,liveLatencyInSeconds:n.liveLatencyInSeconds,playbackRate:n.playbackRate,activeCues:d,activeAsset:h,durationInSeconds:f})})}getActivePlayerAdapter(){return this.activePlayerAdapter}replay(e={}){if(!this.playerLoadRequest)throw w("No active load request found when calling replay!");let t=e.startTimeInSeconds||void 0;if(this.state.value.activeAsset?.livestream&&(t=void 0),t&&typeof this.playerLoadRequest?.loop=="object"&&(t<this.playerLoadRequest.loop.startTimeInSeconds||this.playerLoadRequest.loop.endTimeInSeconds&&t>this.playerLoadRequest.loop.endTimeInSeconds))throw w("You cannot replay from an offset outside of the loop start/end values",{startTimeInSeconds:t},E.OPERATION_NOT_SUPPORTED_35500);let i=this.playerLoadRequest.plugins?.["foundation.plugin.smartclip"],n=this.playerLoadRequest.plugins?.["foundation.plugin.vast4"];return wg(this,{...this.playerLoadRequest,...(i||n)&&e.skipPreRolls?{plugins:{...this.playerLoadRequest.plugins,...i?{"foundation.plugin.smartclip":{...i,adSlots:(i.adSlots||[]).filter(s=>s.offsetInSeconds!==0)}}:{},...n?{"foundation.plugin.vast4":{...n,adSlots:(n.adSlots||[]).filter(s=>s.offsetInSeconds!==0)}}:{}}}:{},autoplay:!0,startTimeInSeconds:t})}getNonLinearElement(){return this.nonLinearElement}setNonLinearElement(e){this.nonLinearElement=e}findSuitablePlayerAdapter(e){this.logger.trace("Find most suitable player adapter for request",e);for(let t of this.playerAdapters){let i=t.getCapabilities();if(this.logger.trace("Checking adapter",t,i,e),!i.manifestTypes.includes(e.manifestType))continue;this.logger.trace("Adapter can play manifest");let s=e.drmConfig&&e.drmConfig.length>0;if(!s||(this.logger.trace("Has DRM config. Checking if adapter can play it",s,e.drmConfig),(e.drmConfig||[]).some(a=>i.keySystems.includes(a.keySystem))))return t}throw w("No suitable player adapter found for asset URL",{loadRequest:e,playerAdapters:this.playerAdapters.map(t=>t.getPlayerType())})}async triggerError(e){if(this.destroyed){this.logger.error("Trigger error called on a destroyed player",{error:e});return}let t=["destroyed","error","ended"];if(t.includes(this.state.value.state)){this.logger.error("Trigger error called in non transitional state",{state:this.state.value.state,nonTransitionalStates:t,error:e});return}let i=Qi(e);for(let n of this.plugins)if(!await n.beforeError(i)){this.logger.debug("Plugin prevented error handling",{pluginKey:n.getKey(),error:i}),await this.dispatchEvent("player:SuppressedError",i);return}return await this.pause().catch(n=>{this.logger.error("Trigger Error Pause failed",n)}),this.state.patch({state:"error",error:i}),i}isFullscreen(){if(this.deviceType===k.Vega)return!0;let e=sn(this.mountPoint);if(!e)return!1;let t=Yi();if(!t)return!1;let{fullscreenElement:i,webkitFullscreenElement:n,mozFullScreenElement:s,msFullscreenElement:r}=t,a=i||n||s||r;return!!a&&!!(a.contains(e)||a.shadowRoot?.contains(e))}timeShift(e){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset?.livestream)throw w("timeShift is only available for livestreams",{},E.OPERATION_NOT_SUPPORTED_35500);if(e<0)throw w("timeShift offset must be a positive number",{},E.OPERATION_NOT_SUPPORTED_35500);return this.activePlayerAdapter.timeShift(e)}seekToLiveEdge(){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset?.livestream)throw w("seekToLiveEdge is only available for livestreams",{},E.OPERATION_NOT_SUPPORTED_35500);return this.activePlayerAdapter.seekToLiveEdge()}getDVRWindowInSeconds(){if(!this.activePlayerAdapter)throw w("No active player adapter found");if(!this.state.value.activeAsset?.livestream)throw w("getDVRWindowInSeconds is only available for livestreams",{},E.OPERATION_NOT_SUPPORTED_35500);return this.activePlayerAdapter.getDVRWindowInSeconds()}setTweaks(e){this.uncheckedTweaks=e}getTweaks(){if(!this.uncheckedTweaks)throw w("INVARIANT: Tried to access Tweaks before they have been set");return this.uncheckedTweaks}showInitialLoadingSpinner(e){let t=Yi();if(t===void 0||t.createElement===void 0)return;let i=e.spinnerColor||"#f0f0f0",n=e.backgroundColor||"#000000",s=e.aspectRatio,r=e.maxSpinnerSize||"140px",a=e.posterUrl;if(this.loadingSpinnerStyles||=t.getElementById?.("fp-loading-spinner-style")||void 0,this.loadingSpinnerStyles||(this.loadingSpinnerStyles=t.createElement("style"),this.loadingSpinnerStyles.setAttribute("id","fp-loading-spinner-style"),this.loadingSpinnerStyles.innerHTML=`[loading-spinner] {
663      --max-spinner-size: ${r};
664      box-sizing: border-box;
665      font-size: 3em;
666      font-size: clamp(calc(0.5 * var(--max-spinner-size)), 12cqw + 1em, var(--max-spinner-size));
667      width: 1em;
668      height: 1em;
669      aspect-ratio: 1;
670      border-radius: 50%;
671      border: 6px solid;
672      border-right-color: transparent;
673      color: ${i};
674      animation: --rotate linear 1.2s infinite;
675    }
676
677    @media (prefers-reduced-motion: reduce) {
678      [loading-spinner] {
679        animation: none;
680      }
681    }
682
683    @keyframes --rotate {
684      from {
685        transform: rotate(0deg);
686      }
687      to {
688        transform: rotate(360deg);
689      }
690    }
691
692    [loading-spinner-container] {
693      display: flex;
694      width: 100%;
695      height: 100%;
696      max-height: 100vh;
697      min-height: 180px; // Minimum height to ensure the layout does not shift too much in audio mode
698      position: relative;
699      overflow: hidden;
700      ${s?`aspect-ratio: ${s};`:""}
701    }
702
703    [loading-spinner-wrapper] {
704        display: flex;
705        flex: 1;
706        justify-content: center;
707        align-items: center;
708        max-width: 100vw;
709        max-height: 100vh;
710        position: relative;
711        padding: 0.5rem;
712        ${a?"":`background: ${n};`}
713      }`,t.head?.appendChild(this.loadingSpinnerStyles)),!this.loadingSpinnerContainer){this.loadingSpinnerContainer=t.createElement?.("div"),this.loadingSpinnerContainer.setAttribute("loading-spinner-container","true");let l=t.createElement?.("div");l.setAttribute("loading-spinner-wrapper","true"),this.loadingSpinnerContainer.appendChild(l);let u=t.createElement?.("div");u.setAttribute("loading-spinner","true"),u.setAttribute("aria-label","Wird geladen"),u.setAttribute("role","progressbar"),l.appendChild(u),a&&(this.loadingSpinnerContainer.style.backgroundImage=`url(${a})`,this.loadingSpinnerContainer.style.backgroundSize="cover",this.loadingSpinnerContainer.style.backgroundPosition="center"),this.mountPoint.appendChild(this.loadingSpinnerContainer)}}hideInitialLoadingSpinner(){this.loadingSpinnerContainer&&this.loadingSpinnerContainer.parentElement===this.mountPoint&&this.mountPoint.removeChild(this.loadingSpinnerContainer)}denySourceUrl(e,t){let i=this.state.value.sourceStatus.map(n=>({...n,denyUntilTimestampInMs:e===n.sourceUrl?t:n.denyUntilTimestampInMs}));this.state.patch({sourceStatus:i}),setTimeout(()=>{this.state.patch({sourceStatus:this.state.value.sourceStatus.map(n=>({...n,denyUntilTimestampInMs:n.denyUntilTimestampInMs&&n.denyUntilTimestampInMs<=Date.now()?void 0:n.denyUntilTimestampInMs}))})},t-Date.now())}connectPlaylist(e){if(this.playlist)throw w("Only one playlist can be connected to the player at a time",{},E.PLAYERCONFIG_PROBLEM_34000);this.playlist=e,e.connect(this)}getPlaylist(){return this.playlist}isLivestreamContentType(e){return[W.Live,W.Event,W.Fast,W.Radio].includes(e)}};function Rl(e){if(!Le("querySelector")||!Le("createElement")||!Le("body"))throw w("Script loading is not supported in this environment",{},E.PLAYERCONFIG_PROBLEM_34000);let t="data-loaded",i=(s,r,a)=>{let l=()=>r(),u=c=>a(c),o=c=>a(c);s.addEventListener("load",l),s.addEventListener("error",u),s.addEventListener("abort",o)},n=document.querySelector(`script[src="${e}"]`);return n?n.getAttribute(t)?new Promise(s=>s()):new Promise((s,r)=>{i(n,s,r)}):new Promise((s,r)=>{let a=document.createElement("script");i(a,()=>{a.setAttribute(t,"1"),s()},r),a.fetchPriority="high",a.src=e,document.body.appendChild(a)})}var xg=(e,t)=>{if(!e)throw w("No module loader provided and bundle options are undefined!",{},E.PLAYER_DEPENDENCY_INVALID_52130);let{version:i,cdnUrl:n}=e;return async s=>{let r=o=>{let d=o.split("/")[1].replace("-",".").split("."),h=t.foundation;for(let f of d)h=typeof h=="object"&&h&&f in h?h[f]:void 0;return h},a=o=>s.includes(o)?!r(o):!1,l=Vp({"@foundation-player/player-dashjs":a("@foundation-player/player-dashjs"),"@foundation-player/player-chromecast":a("@foundation-player/player-chromecast"),"@foundation-player/plugin-npaw":a("@foundation-player/plugin-npaw"),"@foundation-player/plugin-smartclip":a("@foundation-player/plugin-smartclip"),"@foundation-player/plugin-vast4":a("@foundation-player/plugin-vast4"),"@foundation-player/plugin-ui":a("@foundation-player/plugin-ui"),"@foundation-player/plugin-shorts":a("@foundation-player/plugin-shorts"),"@foundation-player/plugin-yospace":a("@foundation-player/plugin-yospace")});if(!l.split("").every(o=>o==="0")){let o=new URL(`/cdn-modules/${i}/bundle.${l}.evergreen.js`,n);await Rl(o.href)}return s.map(o=>[o,r(o)])}},qs=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),xl=(e,t)=>{let i={...e};if(qs(e)&&qs(t)){let n=Object.keys(t);for(let s of n)qs(t[s])?s in e?i={...i,[s]:xl(e[s],t[s])}:i={...i,[s]:t[s]}:i={...i,[s]:t[s]}}return i};function _g(e){let i=Object.entries(fe).map(([n,s])=>[n.toLowerCase(),s]);return e.split(",").reduce((n,s)=>{if(!s.includes("="))return n;let[r,a]=s.trim().split("=").map(o=>o.trim()),l=r.includes(".")?r.split("."):[r],u=i.find(([o])=>o===a.toLowerCase())?.[1];return typeof u=="number"&&n.push([l,u]),n},[]).map(([n,s])=>{let r=n.reverse(),a={[r[0]]:s};for(let l=1;l<r.length;l++)a={[r[l]]:a};return a}).reduce((n,s)=>xl(n,s),{})}var Ws=fe.Warn,Mg=class _l{constructor(t={[Mt]:Ws},i=Mt,n=console){this.configuration=t,this.namespace=i,this.backend=n,this.logLevel=Ws,this.namespace||(this.namespace=Mt);let s=this.namespace.split(".");s.push(Mt);let r=this.configuration;for(let a of s){if(r=a in r?r[a]:r[Mt],typeof r=="number"){this.logLevel=r;break}if(!r){this.logLevel=Ws;break}}}getLogger(t){let i=t;if(!i)return this;let n="foundation.";return i.startsWith(n)&&(i=i.slice(n.length)),new _l(this.configuration,i,this.backend)}log(t,i,...n){if(this.isLoggingActiveForLevel(t)){let s=`[${this.namespace}]: ${i}`;switch(t){case fe.Trace:this.backend.trace(s,...n);break;case fe.Debug:this.backend.debug(s,...n);break;case fe.Info:this.backend.info(s,...n);break;
713case fe.Warn:this.backend.warn(s,...n);break;case fe.Error:this.backend.error(s,...n);break;case fe.None:break}}}getLevel(){return this.logLevel}debug(t,...i){this.log(fe.Debug,t,...i)}error(t,...i){this.log(fe.Error,t,...i)}info(t,...i){this.log(fe.Info,t,...i)}trace(t,...i){this.log(fe.Trace,t,...i)}warn(t,...i){this.log(fe.Warn,t,...i)}isLoggingActiveForLevel(t){return t<=this.logLevel}},Ng="playerLog";function Og(e,t){let i=ne();if(i.foundation?.internal_RootLogger&&!e&&!t){let a=i.foundation.internal_RootLogger;return a.debug("Root logger reused from window object"),a}let n=Dg(),s=t??(n?_g(n):void 0),r=new Mg(s,Mt,e);return i.foundation={...i.foundation||{},internal_RootLogger:r},r.isLoggingActiveForLevel(fe.Debug)&&r.debug("Logger initialized with config:",JSON.stringify(s)),r}function Dg(){let e=tn()?.href;if(e)return new URL(e).searchParams.get(Ng)}var Hg=`[data-foundation-player-styles] {
714  padding: 0;
715  margin: 0;
716  position: relative;
717  overflow: hidden;
718  min-height: 150px;
719  min-width: 260px;
720  box-sizing: content-box;
721  background-color: transparent;
722  width: 100%;
723  height: 100%;
724}
725
726[data-foundation-player-styles]::before {
727  display: block;
728  content: "";
729  width: 100%;
730}
731
732/*
733This is a magic hack initially copied from Bitmovin and applied in general to the player container,
734to unify the aspect ratio handling for all players.
735
736This rule is important for certain devices e.g. Magenta, where if this rule is not applied,
737the player will shrink to a very small size.
738*/
739[data-foundation-player-styles~="aspect-16x9"]::before {
740  padding-bottom: 56.25%;
741}
742
743[data-foundation-player-styles] > * {
744  box-sizing: border-box;
745  padding: 0;
746}
747
748[data-foundation-player-styles] video {
749  position: absolute;
750  top: 0;
751  left: 0;
752  bottom: 0;
753  right: 0;
754  width: 100%;
755  height: 100%;
756}
757`,en=e=>{if(typeof e=="string"&&(e==="0"||e==="false"))return!1;if(typeof e=="string"&&(e==="1"||e==="true"))return!0;if(typeof e=="number"&&(e===0||e===1))return!!e;if(typeof e=="boolean")return e},Vg=(e,t)=>{let i=[k.Desktop,k.Mobile,k.Tablet],n=e??i.includes(t),s=localStorage.getItem("foundation.internal.keepDebugReferences");n=en(s)??n;let r=ne()?.foundation?.internal?.keepDebugReferences;return n=en(r)??n,n},Ug=e=>{let t=e,i=tn()?.href;if(i){let r=new URL(i).searchParams.get("enableNativeHlsOnChromeBrowsers");t=en(r)??t}let n=localStorage.getItem("foundation.experimental.enableNativeHlsOnChromeBrowsers");return en(n)??t};function Bg(e){if(!(e.initialLoadingSpinnerOptions?.enabled??e.ui?.enabled??e.shortsUi?.enabled))return;let i=e.initialLoadingSpinnerOptions?.aspectRatio,n=e.initialLoadingSpinnerOptions?.backgroundColor,s=e.initialLoadingSpinnerOptions?.spinnerColor,r=e.initialLoadingSpinnerOptions?.maxSpinnerSize,a=e.initialLoadingSpinnerOptions?.posterUrl||e.loadRequest?.contentMetadata?.posterUrl;if(e.ui?.enabled){let l=e.ui?.look?.mode??Cl(e.loadRequest);!i&&l!=="audio"&&(i=e.ui?.look?.aspectRatio==="9:16"?"9 / 16":"16 / 9"),e.ui?.look?.theme==="light"&&(n=n??"#ffffff",s=s??"#000000"),l==="audio"&&(r=r??"88px",a=void 0)}return e.shortsUi?.enabled&&(n||(n="transparent"),a=void 0),{aspectRatio:i,backgroundColor:n,spinnerColor:s,maxSpinnerSize:r,posterUrl:a}}async function Fg(e,t){let{mountPoint:i,nonLinearElement:n,getRequestHeader:s,generateVideoElement:r,applyDefaultStyles:a,preload:l,playlist:u,remotePlayback:o,experimental:c,_internal:d}=e,h=Sl();Sg(i,h);let f=Ll(e.loadRequest),g=ne();g.foundation||={};let p;e.moduleLoader?p=e.moduleLoader:p=xg(t,g);let y=Ml(f);g.foundation.internal_deviceType=y;let m=Vg(d?.keepDebugReferences,y),b=new nf(e,m),v=Og(d?.loggerBackend,d?.loggerConfig),T;if(r){if(!Le("createElement"))throw w('"generateVideoElement" option is enabled, but "document.createElement" is not available.',{},E.PLAYERCONFIG_PROBLEM_34000);v.debug("Generating video element due to generateVideoElement option."),T=document.createElement("video"),i.appendChild(T)}a&&qg(i,v);let L=d?.timeouts||{};y===k.Vega&&(L.streamingUrlServiceRequest||=25e3,L.remoteConfigRequest||=25e3,L.advertisingServiceRequest||=5e3,L.loadRequest||=6e4,L.stallingDebounce||=3e4);let M={streamingUrlServiceRequest:L.streamingUrlServiceRequest||5e3,advertisingServiceRequest:L.advertisingServiceRequest||1e3,metadataServiceRequest:L.metadataServiceRequest||5e3,remoteConfigRequest:L.remoteConfigRequest||5e3,loadRequest:L.loadRequest||2e4,stallingDebounce:L.stallingDebounce||1e4},D=new Rg({playerId:h,getRequestHeader:s,moduleLoader:p,debugInterface:b,deviceType:y,mountPoint:i,playlist:u,remotePlayback:o,timeouts:M,generatedVideoElement:T}),j=Bg(e);j&&D.showInitialLoadingSpinner(j),n&&D.setNonLinearElement(n),b.playerInstance=D;let R=g.foundation?.internal_clientSupport;if(!R){let K=Ug(c?.enableNativeHlsOnChromeBrowsers||!1);R=await Jp(i,y,{enableNativeHlsOnChromeBrowsers:K}),b.evaluatedClientSupport=R,g.foundation.internal_clientSupport=R}if(e.shortsUi?.enabled&&!(u||e.shortsUi.playlist))throw w("The shorts ui needs a playlist. Without it, it cannot start.",{},E.PLAYERCONFIG_PROBLEM_34000);let{modules:B,manifestConfiguration:I,pluginConfigs:N,tweaks:H,error:O}=await Il({player:D,playlist:u,loadRequest:f,deviceType:y,clientSupport:R,getRequestHeader:s,possibleUiPluginConfig:e.ui,possibleShortsPluginConfig:e.shortsUi});if(D.setTweaks(H),(N["foundation.plugin.ui"]||N["foundation.plugin.shortsUi"])&&(a||r||n))throw w('"CreatePlayerOptions" of "createPlayer()" are not valid. Do not use the UI in conjunction with "applyDefaultStyles", "generateVideoElement" or "nonLinearElement".',{uiConfig:N["foundation.plugin.ui"],shortsConfig:N["foundation.plugin.shortsUi"],applyDefaultStyles:a,generateVideoElement:r,nonLinearElement:n},E.PLAYERCONFIG_PROBLEM_34000);let U=await p(B);b.evaluatedPluginConfiguration=N;let{plugins:q,playerAdapters:C}=kl(D,{remotePlayback:o,loadRequest:f,mountPoint:i,getRequestHeader:s,moduleLoader:p,playerId:h,manifestConfiguration:I,deviceType:y,pluginConfigs:N,resolvedModules:U,tweaks:H});if(D.hideInitialLoadingSpinner(),O)return await D.triggerError(O),D;if(!I){let K=w("INVARIANT: No manifest available without error");throw await D.triggerError(K),K}let z={plugins:q,playerAdapters:C,manifestConfiguration:I,pluginConfigs:N,loadRequest:f};if(!f.autoplay&&!l)v.debug("Waiting for interaction before loading content."),await D.storeLoadM
757anifestConfigurationOptionsForPreload(z);else{let K=nn(),X=D.state.once(({state:Q,error:ee})=>Q==="error"&&ee!==void 0,({error:Q})=>{K.resolve(Qi(Q))}),ue=await Promise.race([D.loadManifestConfiguration(z).catch(Q=>Q),K.promise]);X(),ue&&v.error("Error loading manifest configuration",ue)}return D}var Ml=e=>!e.deviceType||e.deviceType==="auto-detect"?sf():e.deviceType,qg=(e,t)=>{if(!Le("getElementById")||!Le("createElement")||!Le("getElementsByTagName"))throw w('"generateVideoElement" option is enabled, but "document.createElement" is not available.',{},E.PLAYERCONFIG_PROBLEM_34000);t.debug("Applying default styles due to applyDefaultStyles option.");let i=document.getElementById("foundation-styles")||void 0;if(!i){let n=document.head||document.getElementsByTagName("head")[0];i=document.createElement("style"),i.innerHTML=Hg,i.id="foundation-styles",n.appendChild(i)}e.setAttribute("data-foundation-player-styles","aspect-16x9")};function Wg(){return $g()?"chrome108":zg()?"chrome47":"chrome63"}function $g(){let e=(0,eval)("window.BigInt && window.BigInt.prototype"),t=(0,eval)('Array && Array.prototype && Array.prototype.hasOwnProperty("flat")'),i;try{(0,eval)("var a = {foo: 1};var b = a?.foo;"),i=!0}catch{i=!1}let n;try{(0,eval)("var a = 5; a ||= 10;"),n=!0}catch{n=!1}let s=(0,eval)('Array && Array.prototype && Array.prototype.hasOwnProperty("at")'),r=(0,eval)('Array && Array.prototype && Array.prototype.hasOwnProperty("findLast")');return e&&t&&i&&n&&s&&r}function zg(){let e=(0,eval)('window.URLSearchParams && window.URLSearchParams.prototype && window.URL && URL.prototype && URL.prototype.hasOwnProperty("searchParams")'),t=(0,eval)('Element && Element.prototype && Element.prototype.hasOwnProperty("prepend")'),i=(0,eval)('Object && Object.hasOwnProperty("entries")'),n;try{(0,eval)("var a = {foo: 1};var b = {...a};"),n=!0}catch{n=!1}return!e||!t||!i||!n}function jg(e){let t=/foundationVersion=(\d+.\d+.\d+(-[a-z]+\.\d+)?)/.exec(tn()?.href??"");return t?(console.warn("Overwrite foundation player version",t[1]),t[1]):e??Zi()}var rl=e=>{if(e&&e!=="bundled-version")return e};
757async function Gg(e){let{loadRequest:t,version:i,_internal:n={}}=e,s=rl(i)||rl(t.version)||Zi(),r=n.cdnUrl||"https://cdn.player.foundation/",a=n.bundleTarget||Wg(),l=jg(s),u=()=>ne()?.foundation?.api;if(!u()||u()?.getVersion()!==l){let c=new URL(`/api/${l}/bundle.evergreen.js`,r);await Rl(c.href)}let o=u();if(!o?.internal_createPlayer)throw w("The api package is not correctly loaded!");return o.internal_createPlayer(e,{version:l,cdnUrl:r,bundleTarget:a})}async function Nl(e){let t=performance.now(),i,n=e.loadRequest||e.playlist?.getCurrentLoadRequest();if(!n)throw w('"CreatePlayerOptions" of "createPlayer()" are not valid. You either need a loadRequest or a playlist with at least one loadRequest.',{},E.PLAYERCONFIG_PROBLEM_34000);e.moduleLoader?i=await Fg({...e,loadRequest:n}):i=await Gg({...e,loadRequest:n});let r=performance.now()-t;return i.state.patch({metrics:{...i.state.value.metrics,playerCreationInMs:r}}),i}function rr(e,t){return!pn(e)||!pn(t)?t:(Object.keys(t).forEach(i=>{let n=e[i],s=t[i];Array.isArray(n)&&Array.isArray(s)?e[i]=n.concat(s):pn(n)&&pn(s)?e[i]=rr(n,s):e[i]=s}),e)}function pn(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)}var Dt=class{doAutoplay=!1;media;#e={fairplay:"https://fairplay.rtl.de/Fairplay/license",playready:"https://playready-core.rtl.de/playready/api/license.asmx",widevine:"https://widevine.rtl.de/index/license"};constructor(t){this.media=t}async#t(){let t=document.querySelector("ws-sourcepoint");return t?(await window.customElements.whenDefined("ws-sourcepoint"),await t.getTcString()):""}async getLoadRequest(t){let i={contentType:this.media.isTextToSpeech?W.Text_To_Speech:this.media.isAudioOnly?W.Podcast:W.Vod,contentId:this.media.id,user:{consentString:await this.#t()},remoteConfig:{environment:this.media.environment,clientIdentifier:`html5/rtldigitalnews/${this.media.scope}`},autoplay:this.doAutoplay,contentMetadata:{headline:this.media.headline},plugins:{},manifests:this.createManifestsFromData()};return this.media.kicker&&(i.contentMetadata.secondaryHeadline=this.media.kicker),this.media.durationInSeconds&&(i.contentMetadata.durationInSeconds=this.media.durationInSeconds),this.media.posterUrl&&(i.contentMetadata.posterUrl=this.media.posterUrl),await Promise.all([...t].map(async n=>{n.addFoundationLoadRequestProperties&&n.isEnabled()&&rr(i,await n.addFoundationLoadRequestProperties())})),await Promise.all([...t].map(async n=>{n.addFoundationLoadRequestPlugins&&n.isEnabled()&&rr(i.plugins,await n.addFoundationLoadRequestPlugins())})),console.info("Foundation Player","loadRequest:",i),i}async getUiPluginConfig(){let t=window.matchMedia("(prefers-color-scheme: dark)").matches,i=this.uiMode==="audio"&&!t?"light":"dark",s={enabled:!0,features:{fullscreenOnlyEmitsEvents:this.uiMode==="video"},look:{theme:i}};return console.info("Foundation Player","uiPluginConfig:",s),s}createManifestsFromData(){if(!this.media.renditions)return;let t=[];for(let i in this.media.renditions){if(!Object.hasOwn(this.media.renditions,i)||!["dash","hls","progressive"].includes(i))continue;let n=[];n.push({url:this.media.renditions[i].url});let s={sources:n,type:i};this.media.hasDrm&&(s.licenseServers=this.#n()),t.push(s)}return t}#n(){return[{url:this.#e.fairplay,certificate:"https://fairplay.rtl.de/Certificate/RTLiDe_cert.cer",type:me.Fairplay},{url:this.#e.playready,type:me.Playready},{url:this.#e.widevine,type:me.Widevine}]}};var fn=class extends Dt{uiMode="audio";constructor(t){super(t),this.doAutoplay=t.isTextToSpeech}};var Ht=class e{foundationPlayer;plugins=new Set;media;element;constructor(t){this.element=t,this.media=e.#e(t.dataset),this.registerPlugins()}static#e(t){return{disableAds:t.disableAds==="true",disableDownload:t.disableDownload==="true",durationInSeconds:t.length?yo(t.length):void 0,environment:t.environment??Xi.Prod,freeAccessibleSeconds:t.freeAccessibleSeconds!==void 0?Number(t.freeAccessibleSeconds):void 0,hasDrm:t.hasDrm==="true",headline:t.headline??"",homadClientConfigUrl:t.homadClient,id:t.id??"",isAudioOnly:t.mode==="audio",isLeadContent:["","true"].includes(t.isLeadContent),isTextToSpeech:typeof t.isTextToSpeech<"u",isVideoArticle:t.articleSubType==="video",ivwTopic:t.ivwTopic,kicker:t.kicker,posterUrl:t.poster,renditions:t.renditions!==void 0?JSON.parse(t.renditions):void 0,restricted:t.restricted==="true",scope:t.scope!==void 0?t.scope:void 0,tracking:t.tracking!==void 0?JSON.parse(t.tracking):void 0,zone:t.zone,userNoad:t.userNoad==="true",userPlus:t.userPlus==="true"}}
757async init(){try{this.foundationPlayer=await Nl({mountPoint:this.element,loadRequest:await this.config.getLoadRequest(this.plugins),ui:await this.config.getUiPluginConfig()}),this.plugins.forEach(t=>{t.addFoundationEventListener&&t.isEnabled()&&t.addFoundationEventListener(this.foundationPlayer,this.element)})}catch(t){console.error("Foundation Player","Error creating config:",t)}}};var ae=class{media;constructor(t){this.media=t}};var Vt=class extends ae{#e=10;#t;constructor(t,i){super(t),this.#t=i}isEnabled(){return!0}addFoundationLoadRequestPlugins(){let t={enabled:!0,progressTrackingIntervalInSeconds:this.#e,firstHeadline:this.media.tracking?.staticTitle,headline:this.media.headline,lastPublicationDate:this.media.tracking?.firstPublicationDate,contentType:this.#t};return this.media.tracking?.technicalTags&&(t.tags=this.media.tracking.technicalTags),this.media.tracking?.hiddenSources&&(t.editorialSources=this.media.tracking.hiddenSources.map(i=>i.join())),{"foundation.plugin.googleAnalytics4":t}}};var Ut=class extends ae{constructor(t){super(t)}isEnabled(){return!0}addFoundationLoadRequestPlugins(){return{"foundation.plugin.npaw":{enabled:!0,userType:this.media.userPlus?"paid":"free",title:this.media.tracking?.staticTitle,channelName:this.media.scope}}}};var bi="ws-media.position",Bt=class extends ae{#e;#t;#n=5;#s;#i={};constructor(t){super(t),this.#e=ct("localStorage")&&!!t.id,this.#t=t.id}isEnabled(){return this.#e}addFoundationLoadRequestProperties(){return this.#i=this.#r(),this.#s=this.#i[this.#t]||0,{startTimeInSeconds:this.#s}}addFoundationEventListener(t,i){t.state.onValueChange("currentTimeInSeconds",({currentTimeInSeconds:n,durationInSeconds:s,adActive:r})=>{if(r)return;let a=Math.floor(n),l=Math.floor(s||0);a&&l&&a>=l?this.#o():this.#s!==a&&a%this.#n===0&&this.#a(a)})}#r=()=>{let t=localStorage.getItem(bi);return t?JSON.parse(t):{}};#a=t=>{this.#i=this.#r(),this.#i[this.#t]=t,localStorage.setItem(bi,JSON.stringify(this.#i)),this.#s=t};#o=()=>{delete this.#i[this.#t],localStorage.setItem(bi,JSON.stringify(this.#i)),this.#s=0}};var gn=class extends Ht{config;constructor(t){super(t),this.config=new fn(this.media)}registerPlugins(){this.plugins.add(new Vt(this.media,"audio")),this.plugins.add(new Ut(this.media)),this.plugins.add(new Bt(this.media))}};function ar(e,t,i,n,s,r=!1,a,l="linear"){let u=new URL("https://ad-ipd.sxp.smartclip.net/select"),o=new URLSearchParams(t);u.searchParams.set("ang_conlen",i.toString()),u.searchParams.set("ang_ref",window.location.href),u.searchParams.set("fwd_cf",i<600?"short_form":"long_form"),u.searchParams.set("fwd_vpaid","1"),u.searchParams.set("s",`ems_${a}${n?"/"+n:""}`),l==="non-linear"?u.searchParams.set("sz","over"):u.searchParams.set("sz",e===0?"pre":"post"),u.searchParams.set("type","vast4"),o.forEach((d,h)=>{u.searchParams.set(h,d)}),s&&u.searchParams.set(`fwd_${a}plus`,"1"),r&&u.searchParams.set("fwd_plus_content","1");let c=u.href;return c+="&rnd={TIMESTAMP}",c+="&ang_plrh={PLAYER_HEIGHT}",c+="&ang_plrw={PLAYER_WIDTH}",c+="&consent={CONSENT}",c+="&fwd_adb=[BLOCKED]",c}var mn=class e extends ae{#e="https://bilder-a.akamaihd.net/ip/vcc/vcc.min.js?site=stern";#t={alias:"desternadipdsxpsmartclipnet",config:"https://hgc-cf-cache-1.svonm.com/www.stern.de/config.json",enabled:!0,server:["https://ssl.1.damoh.aws.stern.de/[hash]/","https://ssl.2.damoh.aws.stern.de/[hash]/","https://ssl.3.damoh.aws.stern.de/[hash]/"]};constructor(t){super(t)}static#n(){let t=window.MoltenBundle?.getClient().getZone();return t!==void 0&&t!=="_noad"}isEnabled(){return!this.media.disableAds}async addFoundationLoadRequestPlugins(){return new Promise(t=>{window.MoltenBundle?.cmd.unshift(()=>{e.#n()||t(void 0),this.#a().then(i=>{i&&t({"foundation.plugin.smartclip":i})},()=>{t(void 0)})}),typeof window.MoltenBundle.run=="function"&&window.MoltenBundle.run()})}#s(t){let i=[];return t<90||(t>=90&&t<400&&i.push(60),t>=400&&t<480&&i.push(60,390),t>=480&&t<910&&i.push(300),t>=910&&t<1510&&i.push(300,900),t>=1510&&i.push(300,900,1500)),i}async#i(){let t=[],i=a=>{if(this.media.durationInSeconds&&this.media.durationInSeconds>30&&!this.media.userNoad&&this.media.zone!=="_noad"){let l;if(ct("localStorage")&&this.media.id){let o=localStorage.getItem(bi);o&&(l=JSON.parse(o)[this.media.id])}l||t.push({type:"linear",offsetInSeconds:0,adCall:ar(0,a,this.media.durationInSeconds,this.media.zone,this.media.userPlus,this.media.restricted,this.media.scope,"linear")}),t.push({type:"linear",offsetInSeconds:-1,adCall:ar(-1,a,this.media.durationInSeconds,this.media.zone,this.media.userPlus,this.media.restricted,this.media.scope,"linear")}
757),this.#s(this.media.durationInSeconds).forEach(o=>{t.push({type:"non-linear",offsetInSeconds:o,adCall:ar(o,a,this.media.durationInSeconds,this.media.zone,this.media.userPlus,this.media.restricted,this.media.scope,"non-linear")})})}},n="&fwd_j4=1:2&fwd_j5=2:3:4",s=()=>new Promise(a=>{let l=setTimeout(()=>{a(n)},3e3);window.MoltenBundle.Video.getSXPKeysAsync().then(u=>{clearTimeout(l),a(u)}).catch(()=>{clearTimeout(l),a(n)})}),r=async()=>{window.MoltenBundle.Video.setTargeting("vcd",this.media.durationInSeconds);let a=await s();i(a)};return window.MoltenBundle&&(window.MoltenBundle.Video?await r():await new Promise(a=>{window.addEventListener("AC_ready",async()=>{await r(),a()})})),t}#r(){if(!window.videoCreativeController){console.error("Foundation Player","window.videoCreativeController script is not available!");return}let t=window.videoCreativeController.getSmartClientCoreAdvertisingConfig();return t.adReinsertion?.homad?(t.adReinsertion.homad.setup.activationCallback=async i=>new Promise(n=>{console.info("Foundation Player","Homad activated by reason: ",i),n()}),t.adReinsertion.homad.setup.clientConfig=this.#t,t.adReinsertion.homad.setup.globalConfig="https://s3.amazonaws.com/homad-global-configs.schneevonmorgen.com/global_config.json"):delete t.adReinsertion,t}async#a(){if(await bo(this.#e),!window.videoCreativeController){console.error("Foundation Player","window.videoCreativeController is not available!");return}return{enabled:!0,qualitySettings:window.videoCreativeController.getQualitySettings(),smartclipConfig:this.#r(),adSlots:await this.#i()}}};var bn=class extends ae{isEnabled(){return!0}addFoundationLoadRequestPlugins(){return{"foundation.plugin.visibility":{enabled:!0,pauseAds:!0,pauseContent:!0}}}};var yn=class extends ae{isEnabled(){return!0}addFoundationEventListener(t,i){let n=i.closest(".player-wrapper");n&&(t.addEventListener("ui:fullscreen:enterRequest",()=>{n.classList.add("is-fullscreen"),document.body.classList.add("u-has-fullscreen-video")}),t.addEventListener("ui:fullscreen:exitRequest",()=>{n.classList.remove("is-fullscreen"),document.body.classList.remove("u-has-fullscreen-video")}))}};var vn=class extends ae{constructor(t){super(t)}isEnabled(){return!0}addFoundationLoadRequestPlugins(){return{"foundation.plugin.heartbeat":{enabled:!0,id:"1012674",payStatus:this.media.restricted?11:10,userStatus:this.media.userNoad?5:3,kidsProfile:!1,startType:0,ivw:"/developer/default",offer:"rtlpweb"}}}};var En=class extends ae{constructor(t){super(t)}isEnabled(){return!0}addFoundationLoadRequestPlugins(){return{"foundation.plugin.nielsen":{enabled:!0,commentPath:this.media.ivwTopic}}}};var wn=class extends Dt{uiMode="video";constructor(t){super(t),this.doAutoplay=this.checkForAutoplay(t.isLeadContent,t.isVideoArticle)}checkForAutoplay=(t,i)=>!t||!i?!1:(document.referrer?new URL(document.referrer):void 0)?.origin===window.location.origin};var Sn=class extends Ht{config;constructor(t){super(t),this.config=new wn(this.media)}registerPlugins(){this.plugins.add(new mn(this.media)),this.plugins.add(new bn(this.media)),this.plugins.add(new yn(this.media)),this.plugins.add(new Vt(this.media,"video")),this.plugins.add(new vn(this.media)),this.plugins.add(new En(this.media)),this.plugins.add(new Ut(this.media)),this.plugins.add(new Bt(this.media))}};var Ol=document.createElement("template");Ol.innerHTML=`
758  <style>
759    :host {
760      display: block;
761    }
762
763    .player-wrapper.is-fullscreen {
764      align-items: center;
765      background-color: #000000;
766      block-size: 100dvb;
767      display: flex;
768      inline-size: 100dvi;
769      inset: 0 0 auto auto;
770      justify-content: center;
771      position: fixed;
772      z-index: 2147483647;
773    }
774
775    .player-container {
776      position: relative;
777    }
778
779    .player-container[data-mode="video"] {
780      aspect-ratio: 16/9;
781      inline-size: 100%;
782    }
783
784    .player-container [data-mode="audio"][role="region"] {
785      background-color: var(--color-bg-subtle);
786    }
787  </style>
788  <div class="player-wrapper">
789    <div class="player-container"></div>
790  </div>
791`;var or=class extends HTMLElement{player;#e;#t=!1;get userPlus(){return this.dataset.userPlus==="true"}get restricted(){return this.dataset.restricted==="true"}get freeAccessibleSeconds(){let t=this.dataset.freeAccessibleSeconds,i=parseInt(t??"",10);return isNaN(i)?void 0:i}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ol.content.cloneNode(!0))}#n(t){return{audio:gn,video:Sn}[t]}connectedCallback(){this.#t||(this.#t=!0,this.#e=this.shadowRoot.querySelector(".player-container"),Object.assign(this.#e.dataset,this.dataset),(async()=>(await this.#r(),this.#a()))())}#s(){this.dataset.mode==="audio"&&this.player.state.onValueChange("state",({state:t})=>{t==="playing"&&Array.from(document.querySelectorAll("ws-media")).map(({player:n})=>
791n).filter(Boolean).filter(n=>n!==this.player).forEach(n=>{n.pause()})})}#i(){this.restricted&&typeof this.freeAccessibleSeconds=="number"&&!Number.isNaN(this.freeAccessibleSeconds)&&!this.userPlus&&this.player.state.onValueChange("currentTimeInSeconds",({currentTimeInSeconds:t})=>{if(t>this.freeAccessibleSeconds){this.player.pause();let i=document.querySelector("#paywall-dialog");i&&i.showModal()}})}async#r(){let t=this.#n(this.dataset.mode),i=new t(this.#e);await i.init().catch(n=>{console.error("Foundation Player","Error on player:",n)}),this.player=i.foundationPlayer,this.#i(),this.#s()}#a(){this.querySelector("figure")?.remove()}};customElements.get("ws-media")??customElements.define("ws-media",or);var lr=class extends HTMLElement{#e=[];#t='[aria-expanded="true"]';connectedCallback(){this.#e=Array.from(this.querySelectorAll("[aria-expanded]")),this.#e.forEach(t=>t.addEventListener("click",this.#s)),S.subscribe(ri,this.#n)}disconnectedCallback(){this.#e.forEach(t=>t.removeEventListener("click",this.#s)),S.unsubscribe(ri,this.#n)}#n=()=>{this.#r(Array.from(this.querySelectorAll(this.#t)))};#s=t=>{t.target instanceof HTMLButtonElement&&(this.#i(t.target),this.#a(t.target))};#i(t,i=!1){let n=i||t.getAttribute("aria-expanded")!=="true";t.setAttribute("aria-expanded",n?"true":"false");let s=t.querySelector(".u-visually-hidden");s&&(s.textContent=n?"Zuklappen":"Aufklappen")}#r(t){t.forEach(i=>this.#i(i,!1))}#a(t){let i=t.parentNode;i&&t.getAttribute("aria-expanded")==="false"&&this.#r(Array.from(i.querySelectorAll(this.#t)))}};customElements.get("ws-menu")??customElements.define("ws-menu",lr);var mt="messagehandler",Yg={riddle:{origins:[/^https:\/\/www\.riddle\.com$/],ignoreMessage:e=>typeof e!="object"||e===null?!0:!("riddleEvent"in e&&e.riddleEvent==="page-change"||"riddleEvent"in e&&e.riddleEvent.action.startsWith("answer-poll")||"isRiddle2Event"in e&&e.action==="Block_Next"||"isRiddle2Event"in e&&e.action==="Block_Submit"),adReloadInterval:2,interactionCount:0,disableAdReloadOnMedia:["mobile"]},dpa:{origins:[/^https:\/\/embed\.dpa-electionslive\.com$/,/^https:\/\/ticker\.(capital|geo|stern)\.de$/],ignoreMessage:e=>typeof e=="string"&&e.startsWith("scrollToAnchor")||e?.request==="postUri"||e?.type==="view",adReloadInterval:2,interactionCount:0},games:{origins:[/^https:\/\/games\.softgames\.com$/,/^https:\/\/(dev\.)?weblications\.guj\.de$/,/^https:\/\/tools(\.dev)?\.(capital|geo|stern)\.de$/],ignoreMessage:e=>e!==null&&typeof e=="object"&&"sentinel"in e&&(e.sentinel==="amp"||e.sentinel==="dpa")&&"type"in e&&e.type==="embed-size"||typeof e=="string"&&e.startsWith("setIframeHeight"),adReloadInterval:3,interactionCount:0},"service-tools":{origins:[new RegExp(window.location.origin.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),/^https:\/\/www(\.dev|\.stage)?\.brigitte\.de$/],ignoreMessage:e=>!(typeof e=="string"&&e.startsWith("gujTracker")),evaluateDispatchCondition:e=>{let[,,t=null]=e.match(/^([\w.]+):*(.*)$/),i=JSON.parse(t),{eventCategory:n,eventAction:s,eventLabel:r}=i;return n==="Ernaehrungstool"&&s==="click"&&r==="ergebnis_anzeigen"||s==="filter"||s==="click"},adReloadInterval:2,interactionCount:0}},cr=class extends HTMLElement{#e="not_set";#t="not_set";#n=!1;#s=!1;#i;constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")}connectedCallback(){window.addEventListener("message",this.#c),this.name==="riddle"&&this.#a()}disconnectedCallback(){window.removeEventListener("message",this.#c),this.#i?.disconnect()}#r(t,i){let{origin:n}=t;return i.origins.some(s=>new RegExp(s).test(n))}#a(){let t=document.querySelector('iframe[src*="riddle.com"]');t&&(this.#i=new IntersectionObserver(i=>{for(let n of i)n.isIntersecting&&!this.#n&&(this.#n=!0,this.#i?.disconnect(),this.#d())},{threshold:.5}),this.#i.observe(t))}#o(){return{riddleId:this.#e,riddleTitle:this.#t}}#d(){this.#s||!this.#n||this.#e==="not_set"||(this.#s=!0,S.publish(lo,mt,this.#o()))}#u(t){if(!(typeof t!="object"||t===null)){if("riddleId"in t&&(this.#e=t.riddleId),"riddleTitle"in t&&(this.#t=t.riddleTitle),this.#d(),t.name==="Start"){S.publish(oo,mt,this.#o());return}if(t.action==="Block_Submit"){S.publish(so,mt,this.#o());return}if(t.name==="Finish"){let i={...this.#o(),resultScorePercentage:t.resultScorePercentage??"not_set",playTimeInMilliseconds:t.playT
791imeInMilliseconds??"not_set"};S.publish(ro,mt,i);return}t.name==="restart_riddle"&&S.publish(ao,mt,this.#o())}}#c=t=>{let i=this.name,n=Yg[i];if(!n){console.warn(`No configuration found for service: ${i}`);return}if(this.#r(t,n)){let{data:s}=t;this.name==="games"&&typeof s=="string"&&s.startsWith("gujTracker.restart")&&window.location.reload(),this.name==="riddle"&&this.#u(s),n.ignoreMessage(s)||(n.interactionCount+=1,S.publish(no,mt),n.interactionCount>=n.adReloadInterval&&(!n.disableAdReloadOnMedia?.includes(Ke())&&(!n.evaluateDispatchCondition||n.evaluateDispatchCondition(s))&&S.publish(ai,mt,{adTagIds:["wallpaper_1","superbanner_1","skyscraper_1","rectangle_1","mobile_1"]}),n.interactionCount=0))}}};customElements.get("ws-messagehandler")??customElements.define("ws-messagehandler",cr);var ur=class extends HTMLElement{#e={"netid-accept":{type:"netid_layer_clicked",detail:{eventAction:"layer_action",eventLabel:"accept"}},"netid-accepted":{type:"netid_script_loaded",detail:{eventAction:"script_action",eventLabel:"accepted"}},"netid-close":{type:"netid_layer_clicked",detail:{eventAction:"layer_action",eventLabel:"close"}},"netid-decline":{type:"netid_layer_clicked",detail:{eventAction:"layer_action",eventLabel:"decline"}},"netid-dom-modified":{type:"netid_dom_modified"},"netid-hide":{type:"netid_layer_hidden"},"netid-later":{type:"netid_layer_clicked",detail:{eventAction:"layer_action",eventLabel:"later"}},"netid-loaded":{type:"netid_script_loaded",detail:{eventAction:"script_action",eventLabel:"loaded"}},"netid-show":{type:"netid_layer_shown"},"netid-suppressed":{type:"netid_script_notloaded"}};get url(){return this.getAttribute("url")??""}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.#n(),this.#t(Object.keys(this.#e))}#t(t){for(let i of t)window.addEventListener(i,this.#s)}#n(){let t=document.createElement("script");t.src=this.url,t.defer=!0,this.shadowRoot.appendChild(t)}#s=t=>{let i=this.#e[t.type];if(!i){console.error(`Unknown event: ${t.type}`);return}let{type:n,detail:s}=i,r=new CustomEvent(n,{detail:s});this.dispatchEvent(r)};#i(t){for(let i of t)window.removeEventListener(i,this.#s)}disconnectedCallback(){this.#i(Object.keys(this.#e))}};"customElements"in window&&customElements.get("ws-netid")===void 0&&customElements.define("ws-netid",ur);var dr=class extends HTMLElement{get contentType(){return this.getAttribute("content-type")??""}get isRestricted(){return this.hasAttribute("is-restricted")}connectedCallback(){let t=this.#e(),i=this.querySelector("[data-next-content='toaster']"),n=this.querySelector("[data-next-content='nextread']");t?(i?.remove(),n&&(n.hidden=!1)):(n?.remove(),i&&(i.hidden=!1))}#e(){let t=Ke(),i=!1,n=!0;return t!=="mobile"?i:this.contentType==="gallery"?this.isRestricted?i:n:this.#t()?this.isRestricted||this.contentType==="index"?i:n:i}#t(){return document.referrer.includes("com.google.android.googlequicksearchbox")}};customElements.get("ws-next-content")??customElements.define("ws-next-content",dr);var hr=class extends HTMLElement{get appId(){return this.getAttribute("appId")??""}get assetId(){return this.getAttribute("assetId")??""}get section(){return this.getAttribute("section")??""}get segA(){return this.getAttribute("segA")??""}get vcid(){return this.getAttribute("vcid")??""}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.#n(),this.#e=window.NOLBUNDLE.nlsQ(this.appId,"nlsnInstance",{}),this.#s(this.segA,"CPI",this.vcid),this.#o(),window.addEventListener("pageshow",this.#a),window.onbeforeunload=()=>{this.#i()},S.subscribe(ke,this.#d)}#e;#t;#n(){(function(t,i){function n(s){return typeof s=="object"?JSON.parse(JSON.stringify(s)):s}t[i]=t[i]||{nlsQ:function(s,r,a){var l=t.document,u=l.createElement("script");u.async=1,u.src=(t.location.protocol==="http:"?"http:":"https:")+"//cdn-gl.nmrodam.com/conf/"+s+".js#name="+r+"&ns="+i;var o=l.getElementsByTagName("script")[0];return o.parentNode.insertBefore(u,o),t[i][r]=t[i][r]||{g:a||{},ggPM:function(c,d,h,f,g){t[i][r].q=t[i][r].q||[];try{var p=n([c,d,h,f,g]);t[i][r].q.push(p)}catch{console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}},trackEvent:function(c){t[i][r].te=t[i][r].te||[];try{var d=n(c);t[i][r].te.push(d)}catch{console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}}},t[i][r]}}})(window,"NOLBUNDLE")}#s(t,i,n){let s=n||"",r=document.createElement("script"),a=`"type":"static", "assetid":"${this.assetId}", "section":"${this.section}", "segA":"${t}", "segB":"${i}", "subbrand":"${s}"`;r.innerHTML=`window.articlemetadata = {${a}}`,this.shadowRoot.appendChild(r),sessionStorage.setItem("nielsenMetadata",`{${a}}`)}#i(t){this.#e.ggPM("staticend",t?JSON.parse(this.#t):window.articlemetadata)}#r(t,i){this.shadowRoot.removeChild(this.shadowRoot.childNodes[0]),this.#i(),this.#s(t,i,this.vcid),this.#o()}#a=t=>{t.persisted&&(this.#t=sessionStorage.getItem("nielsenMetadata"),this.#i(this.#t),this.#o())};#o(){this.#e.ggPM("staticstart",window.articlemetadata)}#d=()=>{this.#r(this.segA,"WPI")};disconnectedCallback(){window.removeEventListener("pageshow",this.#a),S.unsubscribe(ke,this.#d)}};customElements.get("ws-nielsen")??customElements.define("ws-nielsen",hr);var pr=class extends HTMLElement{#e=["opulent","video",""];constructor(){super()}get adkeywords(){return JSON.parse(this.getAttribute("adkeywords")??"[]")}get url(){return this.getAttribute("url")??""}get type(){return this.getAttribute("type")??""}get subType(){return this.getAttribute("subtype")??""}get vendorId(){return this.getAttribute("vendorid")??""}get pageHasDynamicContent(){return this.hasAttribute("page-has-dynamic-content")}async connectedCallback(){let t=await this.#i();
791this.vendorId&&t[this.vendorId]?.vendorGrant===!0&&(this.#r(),this.#s(),this.pageHasDynamicContent?(document.addEventListener(ve,this.#t),S.subscribe(he,this.#n)):this.#o())}disconnectedCallback(){document.removeEventListener(ve,this.#t),S.unsubscribe(he,this.#n)}#t=()=>{S.unsubscribe(he,this.#n),document.querySelector(".paid-barrier--zephr:not(dialog *)")?window.OB_ContextKeyValue="paywall":window.OB_ContextKeyValue=void 0,this.#o()};#n=()=>{window.OB_ContextKeyValue=void 0,this.#o()};#s=()=>{!this.pageHasDynamicContent||new URLSearchParams(location.search).get("zephr")!=="false"||(window.OB_ContextKeyValue=void 0)};async#i(){let t=document.querySelector("ws-sourcepoint");return t?(await window.customElements.whenDefined("ws-sourcepoint"),await t.getVendorGrants()):{}}#r(){let t=document.createElement("div");t.setAttribute("data-src",this.url),t.setAttribute("data-widget-id",this.#a(this.adkeywords,this.type,this.subType)),t.setAttribute("class","OUTBRAIN"),this.appendChild(t)}#a(t,i,n){return t.includes("no_guarantee")?"AR_30":t.includes("ct_game")?"AR_3":i==="article"&&this.#e.includes(n)?"AR_1":i==="gallery"?"AR_2":"AR_30"}#o(){let t=document.createElement("script");t.src="https://widgets.outbrain.com/outbrain.js",t.async=!0,t.type="text/javascript",this.appendChild(t)}};customElements.get("ws-outbrain")??customElements.define("ws-outbrain",pr);var Dl="#paywall-dialog",fr=class extends HTMLElement{get targetDialog(){return this.getAttribute("target-dialog")??Dl}connectedCallback(){let t=this.querySelectorAll(".ws-open-dialog"),i=document.querySelector(this.targetDialog);t.length&&i&&t.forEach(n=>{n.addEventListener("click",function(s){s.preventDefault(),i.showModal()})}),S.subscribe(qe,this.handleOpenModal)}handleOpenModal=()=>{let t=document.querySelector(Dl);t&&!t.open&&t.showModal()};disconnectedCallback(){S.unsubscribe(qe,this.handleOpenModal)}};"customElements"in window&&customElements.get("ws-paywallcontrol")===void 0&&customElements.define("ws-paywallcontrol",fr);var Kg=5e3,gr=class extends HTMLElement{#e=!1;#t;constructor(){super(),this.attachShadow({mode:"open"})}get sdk(){return this.getAttribute("sdk")||""}get worker(){return this.getAttribute("worker")||""}connectedCallback(){document.querySelector("ws-zephr")?(document.addEventListener(ve,this.#n),S.subscribe(he,this.#n),S.subscribe(Ae,this.#n),this.#t=window.setTimeout(this.#n,Kg)):this.#s()}disconnectedCallback(){document.removeEventListener(ve,this.#n),S.unsubscribe(he,this.#n),S.unsubscribe(Ae,this.#n),window.clearTimeout(this.#t)}#n=()=>{this.#e||(document.removeEventListener(ve,this.#n),S.unsubscribe(he,this.#n),S.unsubscribe(Ae,this.#n),window.clearTimeout(this.#t),this.#s())};#s(){if(!this.#e){if(this.#e=!0,this.sdk){let t=document.createElement("script");t.src=this.sdk,t.async=!0,this.shadowRoot.appendChild(t)}this.worker&&"serviceWorker"in navigator&&navigator.serviceWorker.register(this.worker,{scope:"/"}).then(t=>{console.log("Service worker registered with scope: "+t.scope)}).catch(t=>{console.log("Service worker registration failed."),console.error(t)})}}};"customElements"in window&&customElements.get("ws-push")===void 0&&customElements.define("ws-push",gr);var Hl=document.createElement("template");Hl.innerHTML=`
792  <style>
793    :host {
794      display: grid;
795      grid-template-areas: "previous . next";
796      grid-template-columns: auto 1fr auto;
797    }
798
799    :host([hidden]) {
800      display: none;
801    }
802
803    slot[name="previous"]::slotted(*),
804    slot[name="next"]::slotted(*) {
805      align-self: center;
806      cursor: pointer;
807      z-index: 1; /* Fixes safari layering issue */
808    }
809
810    slot[name="previous"]::slotted(*) {
811      grid-area: previous;
812    }
813
814    slot[name="next"]::slotted(*) {
815      grid-area: next;
816    }
817
818    slot:not([name])::slotted(*) {
819      grid-area: 1 / 1 / -1 / -1;
820      mask-image: var(--ws-scroller-mask-image);
821    }
822
823    slot[name="dot-indicator"]::slotted(*) {
824      grid-column: 1 / -1;
825    }
826
827    .hidden {
828      visibility: hidden;
829    }
830  </style>
831  <slot></slot>
832  <slot name="previous"></slot>
833  <slot name="next"></slot>
834  <slot name="dot-indicator"></slot>
835`;var mr=class extends HTMLElement{#e={};#t;#n;#s;#i;#r=0;#a;#o;#d;#u;#c=[];constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Hl.content.cloneNode(!0)),this.#e.previous=this.shadowRoot.querySelector('slot[name="previous"]'),this.#e.next=this.shadowRoot.querySelector('slot[name="next"]'),this.#e.default=this.shadowRoot.querySelector("slot:not([name])"),this.#e.dotIndicator=this.shadowRoot.querySelector('slot[name="dot-indicator"]'),this.#n=this.#e.dotIndicator.assignedElements()[0],this.#t=this.#e.default.assignedElements()[0],this.#s=this.#t.querySelector(".scroller__item"),this.#i=this.#t.querySelectorAll(".scroller__item"),this.#o=0,this.#d=!1;let t=getComputedStyle(this.#t);t.display==="flex"?this.#u=parseFloat(t.gap):this.#u=0,this.#a=new IntersectionObserver(this.#f,{root:this.#t,rootMargin:"0px",threshold:Array.from({length:11}
835,(i,n)=>n/10)})}connectedCallback(){this.#d=this.hasAttribute("one-slide-per-move");let t=this.#e.previous,i=this.#e.next;t.style.display="none",i.style.display="none",setTimeout(()=>{this.#b(),t.style.display="",i.style.display=""},100),window.addEventListener("resize",this.#b),t.addEventListener("click",this.#h),i.addEventListener("click",this.#g),"onscrollend"in window||Oi(this.#t),this.#t.addEventListener("scrollend",this.#b),this.#t.addEventListener("focusin",this.#v),this.#c=new Array(this.#i.length).fill(0);for(let n of this.#i)this.#a.observe(n)}#f=t=>{t.forEach(n=>{if(n.target instanceof HTMLElement){let s=Array.prototype.indexOf.call(this.#i,n.target);s!==-1&&(this.#c[s]=n.intersectionRatio)}});let i=this.#l();i!==this.#r&&(this.#r=i,this.#p())};#l(){let t=this.#c.map(i=>i<.95?".":"X").join("");return t==="X.."||t==="XX."?1:t===".X."?2:t===".XX"||t==="..X"?3:0}#p(){this.#r!=null&&this.#n!==void 0&&(this.#n.activeDot=this.#r)}get itemWidth(){return this.#o||(this.#s=this.#t.querySelector(".scroller__item"),this.#o=this.#s.getBoundingClientRect().width),this.#o}#h=t=>{t.preventDefault(),this.#t.scrollLeft-=this.#d?this.itemWidth+this.#u:this.#t.clientWidth*.5};#g=t=>{t.preventDefault(),this.#t.scrollLeft+=this.#d?this.itemWidth+this.#u:this.#t.clientWidth*.5};#v=t=>{let i=t.target;if(!(i instanceof HTMLElement))return;let n=this.#t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=this.#e.previous?.assignedElements()[0],a=this.#e.next?.assignedElements()[0],l=r&&!this.#e.previous.classList.contains("hidden")?r.getBoundingClientRect().width:0,u=a&&!this.#e.next.classList.contains("hidden")?a.getBoundingClientRect().width:0,o=16,c=n.left+l+(l?o:0),d=n.right-u-(u?o:0);s.left<c?this.#t.scrollLeft-=c-s.left:s.right>d&&(this.#t.scrollLeft+=s.right-d)};#b=()=>{let i=this.#t.scrollLeft||0,n=this.#t.clientWidth||0,s=this.#t.scrollWidth||0,r=i===0,a=i+n>=s-5;this.#e.previous.classList.toggle("hidden",r),this.#e.next.classList.toggle("hidden",a),!r&&!a?this.#t.style.setProperty("--ws-scroller-mask-image","var(--ws-scroller-mask-image-both)"):r&&!a?this.#t.style.setProperty("--ws-scroller-mask-image","var(--ws-scroller-mask-image-next)"):!r&&a?this.#t.style.setProperty("--ws-scroller-mask-image","var(--ws-scroller-mask-image-previous)"):this.#t.style.setProperty("--ws-scroller-mask-image","none")};disconnectedCallback(){window.removeEventListener("resize",this.#b),this.#e.previous.removeEventListener("click",this.#h),this.#e.next.removeEventListener("click",this.#g),this.#t.removeEventListener("scrollend",this.#b),this.#t.removeEventListener("focusin",this.#v)}};"customElements"in window&&customElements.get("ws-scroller")===void 0&&customElements.define("ws-scroller",mr);var Xg="shorttextgallery",Vl=document.createElement("template");Vl.innerHTML=`
836  <style>
837    :host {
838      display: block;
839      position: relative;
840    }
841
842    :host([hidden]) {
843      display: none;
844    }
845
846    #scroll-container {
847      display: flex;
848      gap: .5rem;
849      overflow-x: auto;
850      scroll-snap-type: x mandatory;
851      scrollbar-width: none;
852    }
853
854    @media (min-width: 768px) {
855      #scroll-container {
856        gap: 1rem;
857      }
858    }
859
860    #scroll-container::-webkit-scrollbar {
861      display: none;
862    }
863
864    #items::slotted(*) {
865      flex: none;
866      inline-size: 100%;
867      scroll-snap-align: start;
868    }
869
870    #item-counter {
871      font-size: .875rem;
872      padding-block: 0.375rem;
873      padding-inline: 0.75rem;
874    }
875
876    #current-item {
877      font-weight: bolder;
878    }
879
880    #base {
881      align-items: flex-start;
882      display: flex;
883      justify-content: space-between;
884      margin-block-end: 0.75rem;
885      margin-inline-end: 1.5rem;
886    }
887
888    @media (min-width: 768px) {
889      #base {
890        margin-inline-end: 6.25rem;
891      }
892    }
893
894    @media (min-width: 1024px) {
895      #base {
896        margin-block-end: 1rem;
897        margin-inline-end: 4.375rem;
898      }
899    }
900
901    #navigation {
902      display: none;
903    }
904
905    @media (min-width: 768px) {
906      #navigation {
907        display: flex;
908        inline-size: calc(100% - 2.75rem);
909        inset-block-start: 50%;
910        inset-inline-start: -1.5rem;
911        justify-content: space-between;
912        position: absolute;
913        transform: translateY(-50%);
914        z-index: 2;
915      }
916    }
917
918    @media (min-width: 1024px) {
919      #navigation {
920        inline-size: calc(100% - 0.875rem);
921        inset-inline-start: -1.5rem;
922      }
923    }
924
925    @media (prefers-reduced-motion: no-preference) {
926      :host {
927        scroll-behavior: smooth;
928      }
929    }
930  </style>
931  <div id="base">
932    <slot name="headline"></slot>
933    <div id="item-counter"><span id="current-item"></span>/<span id="total-items"></span></div>
934  </div>
935  <slot name="gradient" id="scroll-gradient"></slot>
936  <div id="scroll-container">
937    <slot id="items"></slot>
938    <nav id="navigation">
939        <slot name="previous"></slot>
940        <slot name="next"></slot>
941    </nav>
942  </div>
943  <div class="dots">
944    <slot name="dots"></slot>
945  </div>
946`;var br=class extends HTMLElement{#e;#t;#n={};#s=[];#i;#r;#a;#o;#d=0;#u;#c;#f;#l;#p;#h;#g;get totalItems(){return this.getAttribute("total-items")??"0"}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Vl.content.cloneNode(!0)),this.#e=this.shadowRoot.getElementById("current-item"),this.#i=0,this.#n.items=this.shadowRoot.getElementById("items"),this.#n.next=this.shadowRoot.querySelector('slot[name="next"]'),this.#n.previous=this.shadowRoot.querySelector('slot[name="previous"]'),this.#n.dots=this.shadowRoot.querySelector('slot[name="dots"]'),this.#r=this.#n.next.assignedElements()[0],this.#a=this.#n.previous.assignedElements()[0],this.#f=this.#n.dots.assignedElements()[0],this.#o=this.shadowRoot.getElementById("scroll-container"),this.#t=this.shadowRoot.getElementById("item-counter"),this.#c=this.shadowRoot.getElementById("total-items"),this.#l=this.shadowRoot.getElementById("scroll-gradient"),this.#p=this.#y.bind(this),this.#h=this.#w.bind(this),this.#g=this.#v.bind(this),this.#u=new IntersectionObserver(this.#b.bind(this),{root:this.#o,rootMargin:"0px",threshold:.5})}connectedCallback(){this.#c.textContent=this.totalItems,this.#s=this.#n.items.assignedElements(),this.#s.forEach((t,i)=>{t.dataset.itemNumber||(t.dataset.itemNumber=(i+1).toString()),this.#u.observe(t)}),this.#r&&this.#r.addEventListener("click",this.#p),this.#a&&this.#a.addEventListener("click",this.#h),window.addEventListener("keydown",this.#g),this.#S()}#v(t){switch(t.key.toLowerCase()){case"r":this.#T();break;case"arrowright":this.#y();break;case"arrowleft":this.#w();break}}#b(t){for(let i of t)if(i.isIntersecting&&i.target instanceof HTMLElement){let n=i.target.dataset.itemNumber;n&&(this.#i=parseInt(n,10)-1),this.#C(n),this.#k(n),n!==this.totalItems?this.#l.style.display="block":this.#l.style.display="none",this.#d>0&&(this.#E(this.#d,n),this.#A(this.#i)),this.#d++;break}}#S(){this.#s.forEach(t=>{let i=t.querySelector(".short-text-gallery__item-content");setTimeout(()=>{if(i){let n=t.offsetHeight,s=i.offsetHeight,{paddingBlockStart:r,paddingBlockEnd:a}=getComputedStyle(t),l=t.clientHeight-parseFloat(r)-parseFloat(a),o=window.innerWidth>=768?400:450;l===s&&n>=o&&(i.classList.add("has-overflow"),t.classList.add("has-bottom-gradient"),i.addEventListener("scroll",()=>{let c=Math.ceil(i.scrollTop+i.clientHeight)>=i.scrollHeight;t.classList.toggle("reached-end",c)}))}},150)})}#E=(t,i)=>{let n={count:t,itemNumber:i,adTagIds:["wallpaper_1","superbanner_1","skyscraper_1","rectangle_1","mobile_1"]};S.publish(oi,Xg,n)};#y(){this.#i<this.#s.length-1&&(this.#i+=1),this.#m(this.#i),this.#A(this.#i)}#w(){this.#i>0&&(this.#i-=1),this.#m(this.#i),this.#A(this.#i)}#m(t){if(!this.#o||t===void 0||t<0||t>=this.#s.length)return;let i=this.#s[t];this.#i=t,i.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}#T(){this.#o.scrollTo({behavior:"smooth",left:0})}#k(t){let i=t===this.totalItems.toString(),n=t==="1";this.#a&&(n?this.#a.classList.add("hidden"):this.#a.classList.remove("hidden")),this.#r&&(i?this.#r.classList.add("hidden"):this.#r.classList.remove("hidden"))}#C(t){t&&(this.#e.textContent=t)}#A(t){t!==void 0&&(this.#f.activeDot=t+1)}disconnectedCallback(){this.#r.removeEventListener("click",this.#p),this.#a.removeEventListener("click",this.#h),window.removeEventListener("keydown",this.#g),this.#s.forEac
946h(t=>{let i=t.querySelector(".short-text-gallery__item-content");i&&i.removeEventListener("scroll",this.#S)}),this.#u.disconnect()}};customElements.get("ws-short-text-gallery")??customElements.define("ws-short-text-gallery",br);var Ul=document.createElement("template");Ul.innerHTML=`
947  <style>
948    @keyframes slide-in {
949      from { transform: translateY(100%) }
950    }
951
952    @keyframes slide-out {
953      to { transform: translateY(100%) }
954    }
955
956    :host {
957      --duration: 300ms;
958      --max-inline-size: none;
959      --min-inline-size: 100%;
960
961      animation: slide-in var(--duration) ease-out;
962      box-sizing: border-box;
963      display: block;
964      inline-size: 100%;
965      max-inline-size: var(--max-inline-size);
966      min-inline-size: var(--min-inline-size);
967      padding-block: 0 24px;
968      padding-inline: 20px;
969    }
970
971    :host([hidden])  {
972      animation: slide-out var(--duration) ease-out;
973    }
974
975    #container {
976      align-items: center;
977      background: var(--ws-snackbar-background, #333);
978      border-radius: var(--ws-snackbar-border-radius);
979      box-shadow: var(--ws-snackbar-box-shadow);
980      box-sizing: border-box;
981      display: flex;
982      gap: 12px;
983      justify-content: space-between;
984      min-height: 4rem;
985      padding-block: var(--ws-snackbar-padding-block);
986      padding-inline: var(--ws-snackbar-padding-inline);
987    }
988
989    #label {
990      color: var(--ws-snackbar-label-color, #fff);
991      font-size: 1rem;
992      font-weight: 400;
993      margin: 0;
994      text-align: left;
995    }
996
997    #label:has(+ #action:empty) {
998      text-align: center;
999    }
1000
1001    #action {
1002      background: none;
1003      border-radius: var(--ws-snackbar-action-border-radius);
1004      border: none;
1005      color: var(--ws-snackbar-action-color, #fff);
1006      font-size: 1rem;
1007      font-weight: var(--ws-snackbar-action-font-weight, 400);
1008      line-height: 1;
1009      margin: 0;
1010      padding: 12px;
1011    }
1012
1013    #action:empty {
1014      display: none;
1015    }
1016
1017    @media (hover: hover) {
1018      #action:hover,
1019      #action:focus-visible {
1020        background-color: var(--ws-snackbar-action-background-color-hover);
1021        cursor: pointer;
1022      }
1023    }
1024
1025    #action:active {
1026      background-color: var(--ws-snackbar-action-background-color-active);
1027    }
1028
1029    @media (prefers-reduced-motion: reduce) {
1030      :host {
1031        --duration: 0ms;
1032      }
1033    }
1034
1035    @media (min-width: 768px) {
1036      :host {
1037        --max-inline-size: 560px;
1038        --min-inline-size: 440px;
1039      }
1040    }
1041  </style>
1042  <div id="container">
1043    <p id="label"></p>
1044    <button id="action"></button>
1045  </div>
1046`;var Ft=class extends HTMLElement{actionCallback=()=>{};options={};#e;#t;#n=null;get action(){return this.getAttribute("action")??""}set action(t){t?this.setAttribute("action",t):this.removeAttribute("action")}get label(){return this.getAttribute("label")??""}set label(t){t?this.setAttribute("label",t):this.removeAttribute("label")}constructor(t,i,n,s={}){super(),this.label=t??this.label,this.action=i??this.action,this.actionCallback=n??this.actionCallback,this.#s(s),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ul.content.cloneNode(!0)),this.#t=this.shadowRoot.getElementById("label"),this.#t.textContent=this.label,this.#e=this.shadowRoot.getElementById("action"),this.action&&(this.#e.textContent=this.action,this.#e.addEventListener("click",this.#i.bind(this)))}#s(t){this.options={duration:t.duration?t.duration:this.action===""?2e3:5e3}}connectedCallback(){this.hasAttribute("aria-live")||this.setAttribute("aria-live","polite"),this.hidden=!0}show(){this.addEventListener("animationend",()=>{this.#n=window.setTimeout(()=>this.hide(),this.options.duration)},{once:!0}),this.hidden=!1}hide(){return new Promise(t=>{this.addEventListener("animationend",i=>{if(i.target!==this)return t();this.remove(),t()},{once:!0}),this.#n&&clearTimeout(this.#n),this.hidden=!0})}disconnectedCallback(){this.#e.removeEventListener("click",this.#i.bind(this))}#i(){this.actionCallback(),this.hide()}};"customElements"in window&&customElements.get("ws-snackbar-message")===void 0&&customElements.define("ws-snackbar-message",Ft);var Bl=document.createElement("template");Bl.innerHTML=`
1047  <style>
1048    :host {
1049      contain: content;
1050      display: block;
1051      inline-size: 100%;
1052      inset-block-end: 0;
1053      inset-inline: 0;
1054      position: fixed;
1055    }
1056
1057    #container {
1058      align-items: center;
1059      display: flex;
1060      flex-direction: column;
1061    }
1062  </style>
1063  <slot id="container"></slot>
1064`;var yr=class extends HTMLElement{#e=null;constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.appendChild(Bl.content.cloneNode(!0))}async show(t,i,n,s){let r=this.firstElementChild,a=new Ft(t,i,n,s);r?(this.#e=a,r instanceof Ft&&!r.hidden&&(await r.hide(),this.appendChild(this.#e),this.#e.show())):(this.appendChild(a),a.show())}};"customElements"in window&&customElements.get("ws-snackbar")===void 0&&customElements.define("ws-snackbar",yr);var Fl=document.createElement("template");Fl.innerHTML=`
1065  <style>
1066
1067    :host {
1068      display: block;
1069    }
1070
1071    :host #content[hidden] {
1072      /* Wenn die "display" Eigenschaft \xFCberschrieben wird, muss "display: none"
1073        wiedergestellt werden, f\xFCr den Fall das dass Element ein "hidden" Attribut hat. */
1074      display: none;
1075    }
1076
1077  </style>
1078  <slot name="content" id="content"></slot>
1079  <slot name="consentHeadline" id="consentHeadline"></slot>
1080  <slot name="consentText" id="consentText"></slot>
1081  <slot name="button"></slot>
1082`;var vr=class extends HTMLElement{#e={};#t;#n;#s=!1;get noTracking(){return this.hasAttribute("data-no-tracking")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Fl.content.cloneNode(!0)),this.#e.button=this.shadowRoot.querySelector('slot[name="button"]'),this.#e.content=this.shadowRoot.querySelector("#content"),this.#n=this.#e.button.assignedElements()[0],this.#t=this.#e.content.assignedElements()[0]}async connectedCallback(){let t=await this.#i();if(this.noTracking){this.#n.addEventListener("click",()=>this.embedWidget());return}else t?this.embedWidget():this.#n.addEventListener("click",()=>this.embedWidget());let n=setInterval(()=>{typeof window.__tcfapi=="function"&&(document.querySelector("ws-sourcepoint")?.tcfApiEventlistener(this.updateConsentForWidget.bind(this),this.updateConsentForWidget.bind(this)),clearInterval(n))},200)}async updateConsentForWidget(){if(this.#s)return;await this.#i()&&this.embedWidget()}async#i(){let t=document.querySelector("ws-sourcepoint");return t?(await window.customElements.whenDefined("ws-sourcepoint"),t.getPurposeIdsConsent(["63d7a897cc43ae06156ab273","662779476b5999067b9e054b","5ffec086984dc02862cbbed1","63d7a65d86308407127a3350"])):!1}embedWidget=()=>{let t=document.createRange().createContextualFragment(`<div class="widget-element">${this.#t.textContent||""}</div>`);this.replaceWith(t),this.remove(),this.#s=!0};disconnectedCallback(){this.#n.removeEventListener("click",()=>this.embedWidget())}};"customElements"in window&&customElements.get("ws-socialwidget")===void 0&&customElements.define("ws-socialwidget",vr);var qt="soft-primer",Qg="5",Zg=30,Tn="ws-soft-primer-page-views",kn="ws-soft-primer-next-show",Er=class extends HTMLElement{#e;#t;#n;#s;#i;constructor(){super()}connectedCallback(){this.#s=Date.now(),this.#e=this.querySelector("#soft-primer"),this.#t=this.querySelector("#soft-primer-activate"),this.#n=this.querySelector("#soft-primer-deny"),this.setPageViewed(),this.#u(),(this.getPageViewed()===Qg||this.isTimeToShowPrimer())&&Notification.permission==="default"&&(this.#r(),this.#a(),this.handleTimeToShowPrimer())}disconnectedCallback(){this.#f()}getPageViewed(){return localStorage.getItem(Tn)}setPageViewed(){let t=this.getPageViewed();if(t===null)localStorage.setItem(Tn,"1");else{let i=parseInt(t)+1;localStorage.setItem(Tn,i.toString())}}resetStoredVariables(){localStorage.setItem(Tn,"0"),localStorage.removeItem(kn)}handleTimeToShowPrimer(){let i=this.#s+864e5*Zg;localStorage.setItem(kn,i.toString())}isTimeToShowPrimer(){return!(localStorage.getItem(kn)===null||parseInt(localStorage.getItem(kn))>this.#s)}#r(){this.#e.showModal(),S.publish(co,qt)}#a(){this.#t.addEventListener("click",this.#o),this.#n.addEventListener("click",this.#d)}#o(){S.publish(ns,qt,{push_cta:"yes"}),S.publish(Ni,qt,{state:"requested"}),Notification.requestPermission().then(t=>{t==="granted"?S.publish(Ni,qt,{state:"granted"}):t==="denied"&&S.publish(Ni,qt,{state:"denied"})})}#d(){S.publish(ns,qt,{push_cta:"no"})}async#u(){this.#i=await navigator.permissions.query({name:"notifications"}),this.#i.addEventListener("change",this.#c)}#c=()=>{this.#i.state==="prompt"&&this.resetStoredVariables()};#f(){this.#t.removeEventListener("click",this.#o),this.#n.removeEventListener("click",this.#d),this.#i?.removeEventListener("change",this.#c)}};"customElements"in window&&customElements.get("ws-soft-primer")===void 0&&customElements.define("ws-soft-primer",Er);var ql=document.createElement("template");ql.innerHTML=`
1083  <style>
1084    :host {
1085      display: block;
1086      position: sticky;
1087      top: 0;
1088      transform: translateY(0);
1089      z-index: 1000;
1090    }
1091
1092    :host([offscreen]) {
1093      transform: translateY(-100%);
1094    }
1095
1096    :host([is-in-opulent-area]) {
1097      background-color: transparent;
1098    }
1099
1100    :host([no-transition]) {
1101      transition: none !important;
1102    }
1103
1104    @media (prefers-reduced-motion: no-preference) {
1105      :host {
1106        transition:
1107          transform 600ms ease-out;
1108      }
1109    }
1110  </style>
1111  <slot></slot>
1112`;var wr=class extends HTMLElement{#e;#t;#n;#s;#i;#r;#a;#o;#d;#u;get isInOpulentArea(){return this.hasAttribute("is-in-opulent-area")}set isInOpulentArea(t){t?this.setAttribute("is-in-opulent-area",""):this.removeAttribute("is-in-opulent-area")}get minimal(){return this.hasAttribute("minimal")}set minimal(t){t?this.setAttribute("minimal",""):this.removeAttribute("minimal")}get noTransition(){return this.hasAttribute("no-transition")}set noTransition(t){t?this.setAttribute("no-transition",""):this.removeAttribute("no-transition")}get offscreen(){return this.hasAttribute("offscreen")}set offscreen(t){t?this.setAttribute("offscreen",""):this.removeAttribute("offscreen")}get opulentAreaSelector(){return this.getAttribute("opulent-area-selector")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ql.content.cloneNode(!0)),this.#e=!1,this.#t=12,this.#n=0,this.#s=null,this.#i=0,this.#r=void 0,this.#a=0,this.#o=80,this.#d=0,this.#u=64}connectedCallback(){this.noTransition=!0,this.#s=this.opulentAreaSelector?document.querySelector(this.opulentAreaSelector):null,this.#s&&(this.#e=!0,this.#n=this.#s.clientHeight+this.clientHeight,this.isInOpulentArea=window.scrollY<=this.#n),this.offscreen=window.scrollY>this.#o,window.addEventListener("scroll",this.#f,{passive:!0})}#c=()=>{window.matchMedia("(prefers-reduced-motion: no-preference)").matches&&(this.noTransition=!1);let t=window.scrollY;
1112if(t<=0){this.#r=void 0,this.offscreen=!1,this.minimal=!1;return}if(this.isInOpulentArea=this.#e&&t<=this.#n,this.minimal=window.scrollY>this.#t,this.#r=t<this.#i?"up":"down",this.#r==="up"?(this.#a=0,this.#d+=this.#i-t):this.#r==="down"&&(this.#a+=t-this.#i,this.#d=0),this.#r==="down"&&t>this.#o&&this.#a>this.#o&&(this.offscreen=!0),this.#r==="up"&&this.#d>this.#u){let i=this.#e&&t<=this.#n+this.clientHeight&&t>this.#o;i!==this.offscreen&&(this.offscreen=i)}this.#i=t};#f=os(this.#c,100);disconnectedCallback(){window.removeEventListener("scroll",this.#f)}};"customElements"in window&&customElements.get("ws-sticky-header")===void 0&&customElements.define("ws-sticky-header",wr);var Wl=document.createElement("template");Wl.innerHTML=`
1113  <style>
1114    :host {
1115      --mask-gradient: rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 1) 48px, rgba(0, 0, 0, 1) calc(100% - 48px), rgba(0, 0, 0, 0) 100%;
1116
1117      display: block;
1118      mask-image: linear-gradient(var(--mask-gradient)), linear-gradient(#000, #000);
1119      mask-position: 0 0, 100% 0;
1120      mask-repeat: no-repeat;
1121      mask-size: calc(100% - 12px) 100%, 12px 100%;
1122      overflow-y: auto;
1123      padding-inline-end: 12px;
1124    }
1125
1126    :host([hidden]) {
1127      display: none;
1128    }
1129
1130    :host([at-start]) {
1131      --mask-gradient: rgba(0, 0, 0, 1) calc(100% - 48px), rgba(0, 0, 0, 0) 100%;
1132    }
1133
1134    :host([at-end]) {
1135      --mask-gradient: rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 1) 48px;
1136    }
1137
1138    :host([at-start][at-end]) {
1139      --mask-gradient: #000, #000;
1140    }
1141
1142    /* Works on Firefox */
1143    @supports (scrollbar-color: black white) {
1144      :host {
1145        scrollbar-color: var(--scrollbar-thumb-color) rgb(0 0 0 / 0%);
1146        scrollbar-width: thin;
1147      }
1148    }
1149
1150    /* Works on Chrome, Edge, and Safari */
1151    :host::-webkit-scrollbar {
1152      width: 12px;
1153    }
1154
1155    :host::-webkit-scrollbar-track {
1156      background: rgb(0 0 0 / 0%);
1157    }
1158
1159    :host::-webkit-scrollbar-thumb {
1160      background: var(--scrollbar-thumb-color);
1161      border-radius: 999px;
1162      border: 3px solid rgb(0 0 0 / 0%);
1163      background-clip: padding-box;
1164    }
1165  </style>
1166  <slot></slot>
1167`;var Sr=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Wl.content.cloneNode(!0))}connectedCallback(){this.setAttribute("at-start","true"),this.setAttribute("at-end","true"),this.scrollHeight>this.clientHeight&&(this.#e(),"onscrollend"in window||Oi(this),this.addEventListener("scrollend",this.#e))}disconnectedCallback(){this.removeEventListener("scrollend",this.#e)}#e=()=>{this.scrollTop>5?this.removeAttribute("at-start"):this.setAttribute("at-start","true"),this.scrollTop+this.clientHeight<this.scrollHeight-5?this.removeAttribute("at-end"):this.setAttribute("at-end","true")}};"customElements"in window&&customElements.get("ws-text-scroller")===void 0&&customElements.define("ws-text-scroller",Sr);var Tr="texttospeech",jl=document.createElement("template");jl.innerHTML=`<ws-media
1168  data-disable-ads="false"
1169  data-is-text-to-speech="true"
1170  data-mode="audio"
1171  data-user-noad="false"
1172  data-user-plus="false"></ws-media>`;var Jg="icon-headphones",$l="icon-close",em="Artikel anh\xF6ren",zl="Player schlie\xDFen",kr=class extends HTMLElement{#e=null;#t=null;#n=null;#s=null;#i=null;#r=!1;#a=null;get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}get active(){return this.hasAttribute("active")}set active(t){t?this.setAttribute("active",""):this.removeAttribute("active")}get userPlus(){return this.hasAttribute("data-user-plus")}get userNoAd(){return this.hasAttribute("data-user-noad")}connectedCallback(){this.#o(),this.#u()}#o(){this.#e=this.querySelector("button"),this.#t=this.querySelector("button span"),this.#n=this.querySelector("button i"),this.#s=document.querySelector(".feature-bar__player-container"),this.#e&&this.#t&&this.#n&&this.#s&&this.#e.addEventListener("click",this.#l)}#d=()=>{this.#r=!0,this.#a?.(),this.#a=null};#u(){this.dataset.abridgedUrl&&document.getElementsByTagName("ws-zephr").length&&(document.addEventListener(ve,this.#d),S.subscribe(he,this.#d),S.subscribe(Ae,this.#d))}#c(){this.dataset.abridgedUrl&&(document.removeEventListener(ve,this.#d),S.unsubscribe(he,this.#d),S.unsubscribe(Ae,this.#d))}async#f(){let t=this.dataset.abridgedUrl;return!t||!document.getElementsByTagName("ws-zephr").length?this.dataset.url:(this.#r||await Promise.race([new Promise(n=>{this.#a=n}),new Promise(n=>setTimeout(n,5e3))]),this.#r?!!document.querySelector(".paid-barrier--zep
1172hr:not(dialog *)")?t:this.dataset.url:this.dataset.url)}#l=()=>{this.loaded?this.#h():this.#p()};async#p(){this.loaded=!0;let t=await this.#f();this.#i=jl.content.cloneNode(!0).firstChild,this.#i.setAttribute("data-renditions",JSON.stringify({progressive:{url:t}})),this.dataset.kicker&&this.#i.setAttribute("data-kicker",this.dataset.kicker),this.#i.setAttribute("data-headline",this.dataset.headline),this.#i.setAttribute("data-id",this.dataset.id),this.#i.setAttribute("data-scope",this.dataset.scope),this.#i.setAttribute("data-zone",this.dataset.zone),this.#i.setAttribute("data-user-plus",String(this.userPlus)),this.#i.setAttribute("data-user-noad",String(this.userNoAd)),this.#s.appendChild(this.#i),this.active=!0,this.#t.innerText=zl,this.#n.className=$l,S.publish(ss,Tr)}#h(){this.#i&&(this.active?(this.active=!1,this.#s.classList.add("d-none"),this.#t.innerText=em,this.#n.className=Jg,this.#i.player.pause(),S.publish(uo,Tr)):(this.active=!0,this.#s.classList.remove("d-none"),this.#t.innerText=zl,this.#n.className=$l,this.#i.player.play(),S.publish(ss,Tr)))}disconnectedCallback(){this.#e&&this.#e.removeEventListener("click",this.#l),this.#c()}};customElements.get("ws-texttospeech")??customElements.define("ws-texttospeech",kr);var Gl=document.createElement("template"),tm="mehr anzeigen",im="weniger anzeigen";Gl.innerHTML=`
1173  <style></style>
1174  <slot></slot>
1175`;var Ar=class extends HTMLElement{get tocTarget(){return this.getAttribute("toc-target")??""}get maxItems(){let t=this.getAttribute("max-items");return t?parseInt(t,10):0}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Gl.content.cloneNode(!0))}connectedCallback(){this.querySelector("button")?.addEventListener("click",this.#e)}#e=t=>{this.toggleTocItems(),t.preventDefault(),t.stopPropagation()};toggleTocItems(){let t=this.tocTarget,i=this.maxItems;if(!t)return;let n=document.getElementById(t);if(!n||n.tagName!=="UL")return;let s=n.querySelectorAll("li"),r=!1;s.forEach((l,u)=>{u>=i&&(l.hidden=!l.hidden,l.hidden&&(r=!0))});let a=this.querySelector("button");a&&(a.textContent=r?tm:im,a.ariaExpanded=r?"false":"true")}disconnectedCallback(){this.removeEventListener("click",this.#e)}};"customElements"in window&&customElements.get("ws-toc")===void 0&&customElements.define("ws-toc",Ar);var jh="onboarding-popup",Gh=document.createElement("template");Gh.innerHTML=`
1176  <style>
1177    :host {
1178      --transition-time: 500ms;
1179
1180      display: block;
1181      position: absolute;
1182      transition:
1183        opacity var(--transition-time),
1184        display var(--transition-time) allow-discrete,
1185        translate var(--transition-time);
1186      z-index: 1;
1187
1188      @starting-style {
1189        opacity: 0;
1190        translate: 0 1rem;
1191      }
1192    }
1193
1194    :host([hidden]) {
1195      display: none;
1196      opacity: 0;
1197      translate: 0 1rem;
1198    }
1199
1200    /* using inset with anchor() instead of "position-area" because position-area does not work for our specific article markup. */
1201    :host([position~="top"]) {
1202      inset-block-end: anchor(start);
1203      margin-block-end: 1.25rem;
1204    }
1205
1206    :host([position~="left"]) {
1207      inset-inline-start: anchor(start);
1208      margin-inline-end: var(--article-padding-inline);
1209    }
1210
1211    :host([position~="right"]) {
1212      inset-inline-end: anchor(end);
1213      margin-inline-start: var(--article-padding-inline);
1214    }
1215
1216    .tooltip {
1217      --padding: 1rem;
1218
1219      background-color: var(--color-bg-secondary);
1220      border: 1px solid var(--color-bd-subtle-300);
1221      border-radius: 0.25rem;
1222      box-sizing: border-box;
1223      display: inline-flex;
1224      max-inline-size: 15.4375rem;
1225      padding: var(--padding);
1226      position: relative;
1227
1228      @media (prefers-color-scheme: light) {
1229        filter: drop-shadow(0 4px 16px rgba(25, 25, 25, 0.08))
1230          drop-shadow(0 2px 4px rgba(25, 25, 25, 0.04));
1231        will-change: filter; /* Promote to GPU layer to aviod flickering in safari */
1232      }
1233    }
1234
1235    .tooltip::after {
1236      --size: 1rem;
1237
1238      background-color: var(--color-bg-secondary);
1239      block-size: var(--size);
1240      border-block-end: inherit;
1241      border-inline-end: inherit;
1242      border-end-end-radius: 0.125rem;
1243      box-sizing: border-box;
1244      content: "";
1245      inline-size: var(--size);
1246      inset-block-end: calc(var(--size) / -2 - 1px);
1247      position: absolute;
1248      rotate: 45deg;
1249    }
1250
1251    :host([position~="left"]) .tooltip::after {
1252      inset-inline-start: var(--padding);
1253    }
1254
1255    :host([position~="right"]) .tooltip::after {
1256      inset-inline-end: var(--padding);
1257    }
1258
1259    slot[name="title"] {
1260      display: block;
1261      margin-block-end: 0.5rem;
1262      margin-inline-end: 1rem; /* offset to avoid collision with absolute positioned close button */
1263    }
1264
1265    slot[name="content"] {
1266      color: var(--color-txt-subtle-600);
1267    }
1268
1269    button {
1270      background: var(--color-bg-secondary);
1271      border: none;
1272      border-radius: 0.25rem;
1273      color: var(--color-txt-default);
1274      cursor: pointer;
1275      display: inline-flex;
1276      inset-block-start: 0.25rem;
1277      inset-inline-end: 0.25rem;
1278      padding: 0.25rem;
1279      position: absolute;
1280    }
1281
1282    button::before {
1283      content: var(--ws-tooltip-close-icon-content);
1284      font: normal 1rem/1 var(--ws-tooltip-close-icon-font-family);
1285    }
1286  </style>
1287
1288  <div class="tooltip" role="tooltip">
1289    <div>
1290      <slot name="title"></slot>
1291      <slot name="content"></slot>
1292    </div>
1293    <button aria-label="Schlie\xDFen"></button>
1294  </div>
1295`;var Ma="ws-tooltip.show-preferred-source",Na=class extends HTMLElement{#e=`--tooltip-${crypto.randomUUID()}`;#t;#n=!1;#s;#i;get delay(){let t=this.getAttribute("delay");return t?parseInt(t,10):null}get eventNameClosed(){return this.getAttribute("event-name-closed")??"tooltip_closed"}get eventNameShown(){return this.getAttribute("event-name-shown")??"tooltip_shown"}get hidden(){return this.hasAttribute("hidden")}set hidden(t){t?this.setAttribute("hidden",""):this.removeAttribute("hidden")}get position(){return this.getAttribute("position")??""}get target(){return this.getAttribute("target")}get usage(){return this.getAttribute("usage")}constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Gh.content.cloneNode(!0)),this.#t=this.shadowRoot.querySelector("button")}connectedCallback(){this.#a()&&this.target&&(this.#i=document.querySelector(this.target),this.#i&&(this.#s=new IntersectionObserver(this.#r.bind(this),{threshold:.5}),this.#s.observe(this.#i),this.#t.addEventListener("click",()=>this.#f()),this.#i.style.anchorName=this.#e,this.style.positionAnchor=this.#e,this.#l(),this.usage==="preferred-source"&&this.#i.addEventListener("click",this.#u)))}disconnectedCallback(){this.#s?.disconnect(),this.#t.removeEventListener("click",()=>this.#f()),this.usage==="preferred-source"&&this.#i?.removeEventListener("click",this.#u)}
1295#r([t]){t?.isIntersecting&&(this.delay?setTimeout(()=>this.#c(),this.delay):this.#c())}#a=()=>this.usage?this.usage==="onboarding"?window.location.hash==="#onboarding":this.usage==="preferred-source"?this.#d():!1:!1;#o=()=>{let t=new Date;t.setMonth(t.getMonth()+1),localStorage.setItem(Ma,t.toISOString())};#d=()=>{if(window.location.hash==="#onboarding")return!1;let t=localStorage.getItem(Ma);if(!t)return!0;if(t==="never")return!1;let i=new Date(t);return new Date>=i};#u=()=>{localStorage.setItem(Ma,"never")};#c(){if(this.#n)return;this.hidden=!1,this.usage==="preferred-source"&&this.#o();let t={event:this.eventNameShown,tooltipName:this.dataset.tooltipName,id:this.dataset.id,headline:this.dataset.headline,type:this.dataset.type};S.publish(po,jh,t)}#f(){this.#n=!0,this.hidden=!0;let t={event:this.eventNameClosed,tooltipName:this.dataset.tooltipName,id:this.dataset.id,headline:this.dataset.headline,type:this.dataset.type};S.publish(ho,jh,t)}async#l(){if(CSS.supports("anchor-name: --a")||!this.#i)return;let t=this.#i.getAttribute("style")??"",i=this.getAttribute("style")??"",n=[];this.position.includes("top")&&n.push("inset-block-end: anchor(start);"),this.position.includes("left")&&n.push("inset-inline-start: anchor(start);"),this.position.includes("right")&&n.push("inset-inline-end: anchor(end);"),this.#i.setAttribute("style",`anchor-name: ${this.#e}; ${t}`),this.setAttribute("style",`position-anchor: ${this.#e}; ${n.join(" ")}; ${i}`);let{default:s}=await Promise.resolve().then(()=>(zh(),$h));s()}};"customElements"in window&&customElements.get("ws-tooltip")===void 0&&customElements.define("ws-tooltip",Na);var Oa=class extends HTMLElement{get url(){return this.getAttribute("url")??""}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){try{let t=this.querySelector('script[type="application/json"]');t||console.warn("Upscore configuration script not found.");let i=JSON.parse(t?.textContent??"{}");this.#e(i)}catch(t){t instanceof SyntaxError?console.error("Error parsing Upscore configuration:",t):console.error("An unexpected error occurred:",t)}}#e(t){(function(n,s,r,a,l){n[l]=n[l]||function(c){(n[l].q=n[l].q||[]).push(c)},n[l].ls=1*new Date;var u=s.createElement(r),o=s.getElementsByTagName(r)[0];u.async=1,u.src=a,o.parentNode.insertBefore(u,o)})(window,document,"script","//files.upscore.com/async/upScore.js","upScore"),window.upScore(t);let i=`https://hl.upscore.com/config/${this.url}.js`;fetch(i).then(n=>n.text()).then(n=>{if(!n.includes("Domain not configured for headline-testing")){let s=document.createElement("script");s.textContent=n,s.async=!0,this.shadowRoot.appendChild(s)}}).catch(n=>{console.error("Failed to load A/B headline testing script:",n)})}};customElements.get("ws-upscore")??customElements.define("ws-upscore",Oa);var Yh=document.createElement("template");Yh.innerHTML=`
1296  <style>
1297    :host {
1298      display: inline-flex;
1299    }
1300
1301    .user-badge__initial {
1302      display: none;
1303    }
1304
1305    :host([data-initial]) .user-badge__initial {
1306      display: inline-flex;
1307    }
1308
1309    :host([data-initial]) ::slotted(*) {
1310      display: none;
1311    }
1312  </style>
1313  <span class="user-badge__initial" part="initial" aria-hidden="true"></span>
1314  <slot></slot>
1315`;var Da=class extends HTMLElement{#e;constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Yh.content.cloneNode(!0)),this.#e=this.shadowRoot.querySelector(".user-badge__initial")}async connectedCallback(){let t;try{t=await Ui()}catch{return}!t?.email||!["active","needsRefresh"].includes(t.sessionStatus)||(this.#e.textContent=t.email.charAt(0).toUpperCase(),this.dataset.initial="")}};customElements.get("ws-user-badge")??customElements.define("ws-user-badge",Da);var Ha=class extends HTMLElement{async connectedCallback(){let t;try{t=await Ui()}catch{return}if(!t?.email||!["active","needsRefresh"].includes(t.sessionStatus))return;let i=this.querySelector('[data-user-greeting="title"]'),n=this.querySelector('[data-user-greeting="email"]');i&&(i.textContent="Willkommen"),n&&(n.textContent=t.email)}};customElements.get("ws-user-greeting")??customElements.define("ws-user-greeting",Ha);var Va=class extends HTMLElement{get url(){return this.getAttribute("url")??""}get key(){return this.getAttribute("key")??""}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`<img src="${this.url}${this.key}" height="1" width="1" border="0" alt="">`}};customElements.get("ws-vgwort")??customElements.define("ws-vgwort",Va);var wS={MessageHub:S},Kh=[...window.website?._q??[]],Ua=!1;function Xh(e){try{e(wS)}catch(t){console.error("[website] isReady callback threw:",t)}}var SS={isReady(e){if(typeof e!="function")throw new TypeError("website.isReady: callback must be a function.");Ua?Xh(e):Kh.push(e)},showMessages(e){let t=e?.toLowerCase()??"";console.table(S.inspect().filter(i=>i.eventName.toLowerCase().includes(t)))}};window.website=SS;
1315function Qh(){Ua||(Ua=!0,Kh.splice(0).forEach(Xh))}Qh();})();
1316/*! Bundled license information:
1317
1318m3u8-parser/dist/m3u8-parser.es.js:
1319  (*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 *)
1320*/
1321//# sourceMappingURL=/public/body-KHCZF3BQ.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.