This repository has been archived by the owner on Jul 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
watch-series-helper.user.js
32 lines (29 loc) · 53.8 KB
/
watch-series-helper.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ==UserScript==
// @homepage https://github.com/AlorelUserscripts/watch-series-helper
// @supportURL https://github.com/AlorelUserscripts/watch-series-helper/issues
// @icon https://raw.githubusercontent.com/AlorelUserscripts/watch-series-helper/master/favicon.ico
// @downloadURL https://raw.githubusercontent.com/AlorelUserscripts/watch-series-helper/master/watch-series-helper.user.js
// @updateURL https://raw.githubusercontent.com/AlorelUserscripts/watch-series-helper/master/watch-series-helper.meta.js
// @version 0.1.4
// @name WatchSeries helper
// @namespace alorel.watch-series-helper
// @author https://github.com/Alorel
// @description Helps you on WatchSeries
// @grant none
// @require https://cdn.polyfill.io/v2/polyfill.min.js?rum=0&flags=always,gated&features=default,HTMLDocument,Array.prototype.includes,console.warn,console.error,Symbol
// @include http*://*watchseries.to/episode/*.html
// ==/UserScript==
(function(){!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wsh=t():e.wsh=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(1),n(3)},function(e,t,n){(function(e){(function(){"use strict";var t,n="undefined"!=typeof window&&window===this?this:void 0!==e&&null!=e?e:this,r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};function o(){o=function(){},n.Symbol||(n.Symbol=a)}var i,a=(i=0,function(e){return"jscomp_symbol_"+(e||"")+i++});function s(){o();var e=n.Symbol.iterator;e||(e=n.Symbol.iterator=n.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&r(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return d(this)}}),s=function(){}}function d(e){var t=0;return function(e){return s(),(e={next:e})[n.Symbol.iterator]=function(){return this},e}(function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}})}function l(e){s();var t=e[Symbol.iterator];return t?t.call(e):d(e)}function u(e,t){return{index:e,m:[],v:t}}function h(e,t,n,r){var o=0,i=0,a=0,s=0,d=Math.min(t-o,r-i);if(0==o&&0==i)e:{for(a=0;a<d;a++)if(e[a]!==n[a])break e;a=d}if(t==e.length&&r==n.length){s=e.length;for(var l=n.length,h=0;h<d-a&&c(e[--s],n[--l]);)h++;s=h}if(i+=a,r-=s,0==(t-=s)-(o+=a)&&0==r-i)return[];if(o==t){for(t=u(o,0);i<r;)t.m.push(n[i++]);return[t]}if(i==r)return[u(o,t-o)];for(r=r-(a=i)+1,s=t-(d=o)+1,t=Array(r),l=0;l<r;l++)t[l]=Array(s),t[l][0]=l;for(l=0;l<s;l++)t[0][l]=l;for(l=1;l<r;l++)for(h=1;h<s;h++)if(e[d+h-1]===n[a+l-1])t[l][h]=t[l-1][h-1];else{var _=t[l-1][h]+1,f=t[l][h-1]+1;t[l][h]=_<f?_:f}for(d=t.length-1,a=t[0].length-1,r=t[d][a],e=[];0<d||0<a;)0==d?(e.push(2),a--):0==a?(e.push(3),d--):(s=t[d-1][a-1],(_=(l=t[d-1][a])<(h=t[d][a-1])?l<s?l:s:h<s?h:s)==s?(s==r?e.push(0):(e.push(1),r=s),d--,a--):_==l?(e.push(3),d--,r=l):(e.push(2),a--,r=h));for(e.reverse(),t=void 0,d=[],a=0;a<e.length;a++)switch(e[a]){case 0:t&&(d.push(t),t=void 0),o++,i++;break;case 1:t||(t=u(o,0)),t.v++,o++,t.m.push(n[i]),i++;break;case 2:t||(t=u(o,0)),t.v++,o++;break;case 3:t||(t=u(o,0)),t.m.push(n[i]),i++}return t&&d.push(t),d}function c(e,t){return e===t}function _(){this.L=this.root=null,this.A=!1,this.h=this.u=this.G=this.assignedSlot=this.assignedNodes=this.i=null,this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.l=void 0,this.I=this.J=!1,this.s={}}function f(e){return e.__shady||(e.__shady=new _),e.__shady}function p(e){return e&&e.__shady}_.prototype.toJSON=function(){return{}};var y=window.ShadyDOM||{};y.U=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var v=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");function g(e){return(e=p(e))&&void 0!==e.firstChild}function m(e){return"ShadyRoot"===e.R}function b(e){return(e=(e=p(e))&&e.root)&&Me(e)}y.c=!!(v&&v.configurable&&v.get),y.H=y.force||!y.U,y.j=y.noPatch||!1,y.K=y.preferPerformance;var N=Element.prototype,E=N.matches||N.matchesSelector||N.mozMatchesSelector||N.msMatchesSelector||N.oMatchesSelector||N.webkitMatchesSelector,w=document.createTextNode(""),C=0,T=[];function S(e){T.push(e),w.textContent=C++}new MutationObserver(function(){for(;T.length;)try{T.shift()()}catch(e){throw w.textContent=C++,e}}).observe(w,{characterData:!0});var O=!!document.contains;function M(e,t){for(;t;){if(t==e)return!0;t=t.__shady_parentNode}return!1}function x(e){for(var t=e.length-1;0<=t;t--){var n=e[t],r=n.getAttribute("id")||n.getAttribute("name");r&&"length"!==r&&isNaN(r)&&(e[r]=n)}return e.item=function(t){return e[t]},e.namedItem=function(t){if("length"!==t&&isNaN(t)&&e[t])return e[t];for(var n=l(e),r=n.next();!r.done;r=n.next())if(((r=r.value).getAttribute("id")||r.getAttribute("name"))==t)return r;return null},e}function P(e,t,n,r){for(var o in n=void 0===n?"":n,t){var i=t[o];if(!(r&&0<=r.indexOf(o))){i.configurable=!0;var a=n+o;if(i.value)e[a]=i.value;else try{Object.defineProperty(e,a,i)}catch(e){}}}}function D(e){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t}var L,j=[];function A(e){L||(L=!0,S(k)),j.push(e)}function k(){L=!1;for(var e=!!j.length;j.length;)j.shift()();return e}k.list=j;var R,H=D({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get textContent(){return this.__shady_textContent},set textContent(e){this.__shady_textContent=e},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get innerHTML(){return this.__shady_innerHTML},set innerHTML(e){return this.__shady_innerHTML=e},get shadowRoot(){return this.__shady_shadowRoot}}),I=D({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className},set className(e){return this.__shady_className=e}});for(R in H)H[R].enumerable=!1;for(var F in I)I[F].enumerable=!1;var U=y.c||y.j,B=U?function(){}:function(e){var t=f(e);t.J||(t.J=!0,P(e,I))},G=U?function(){}:function(e){var t=f(e);t.I||(t.I=!0,P(e,H))};function q(e,t,n){B(e),n=n||null;var r=f(e),o=f(t),i=n?f(n):null;r.previousSibling=n?i.previousSibling:t.__shady_lastChild,(i=p(r.previousSibling))&&(i.nextSibling=e),(i=p(r.nextSibling=n))&&(i.previousSibling=e),r.parentNode=t,n?n===o.firstChild&&(o.firstChild=e):(o.lastChild=e,o.firstChild||(o.firstChild=e)),o.childNodes=null}function W(e){var t=f(e);if(void 0===t.firstChild){t.childNodes=null;var n,r=t.firstChild=e.__shady_native_firstChild||null;for(t.lastChild=e.__shady_native_lastChild||null,G(e),t=r;t;t=t.__shady_native_nextSibling)(r=f(t)).parentNode=e,r.nextSibling=t.__shady_native_nextSibling||null,r.previousSibling=n||null,n=t,B(t)}}var z=window.document,V=y.K,J=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),K=J&&J.get;function X(e){for(var t;t=e.__shady_firstChild;)e.__shady_removeChild(t)}function $(e,t,n){(e=(e=p(e))&&e.i)&&(t&&e.addedNodes.push(t),n&&e.removedNodes.push(n),function(e){e.a||(e.a=!0,S(function(){e.flush()}))}(e))}var Q=D({get parentNode(){var e=p(this);return void 0!==(e=e&&e.parentNode)?e:this.__shady_native_parentNode},get firstChild(){var e=p(this);return void 0!==(e=e&&e.firstChild)?e:this.__shady_native_firstChild},get lastChild(){var e=p(this);return void 0!==(e=e&&e.lastChild)?e:this.__shady_native_lastChild},get nextSibling(){var e=p(this);return void 0!==(e=e&&e.nextSibling)?e:this.__shady_native_nextSibling},get previousSibling(){var e=p(this);return void 0!==(e=e&&e.previousSibling)?e:this.__shady_native_previousSibling},get childNodes(){if(g(this)){var e=p(this);if(!e.childNodes){e.childNodes=[];for(var t=this.__shady_firstChild;t;t=t.__shady_nextSibling)e.childNodes.push(t)}var n=e.childNodes}else n=this.__shady_native_childNodes;return n.item=function(e){return n[e]},n},get parentElement(){var e=p(this);return(e=e&&e.parentNode)&&e.nodeType!==Node.ELEMENT_NODE&&(e=null),void 0!==e?e:this.__shady_native_parentElement},get isConnected(){if(K&&K.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;var e=this.ownerDocument;if(O){if(e.__shady_native_contains(this))return!0}else if(e.documentElement&&e.documentElement.__shady_native_contains(this))return!0;for(e=this;e&&!(e instanceof Document);)e=e.__shady_parentNode||(m(e)?e.host:void 0);return!!(e&&e instanceof Document)},get textContent(){if(g(this)){for(var e,t=[],n=0,r=this.__shady_childNodes;e=r[n];n++)e.nodeType!==Node.COMMENT_NODE&&t.push(e.__shady_textContent);return t.join("")}return this.__shady_native_textContent},set textContent(e){switch(null==e&&(e=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!g(this)&&y.c){var t=this.__shady_firstChild;(t!=this.__shady_lastChild||t&&t.nodeType!=Node.TEXT_NODE)&&X(this),this.__shady_native_textContent=e}else X(this),(0<e.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(e));break;default:this.nodeValue=e}},insertBefore:function(e,t){if(this.ownerDocument!==z&&e.ownerDocument!==z)return this.__shady_native_insertBefore(e,t),e;if(e===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(t){var n=p(t);if(void 0!==(n=n&&n.parentNode)&&n!==this||void 0===n&&t.__shady_native_parentNode!==this)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.")}if(t===e)return e;var r=[],o=(n=De(this))?n.host.localName:vt(this),i=e.__shady_parentNode;if(i){var a=vt(e);i.__shady_removeChild(e,!!n||!De(e))}i=!0;var s=!(V&&void 0!==e.__noInsertionPoint||function e(t,n){var r=pt();if(!r)return!0;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){r=!0,t=t.__shady_childNodes;for(var o=0;r&&o<t.length;o++)r=r&&e(t[o],n);return r}return t.nodeType!==Node.ELEMENT_NODE||r.currentScopeForNode(t)===n}(e,o)),d=n&&!e.__noInsertionPoint&&(!V||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE);return(d||s)&&(s&&(a=a||vt(e)),gt(e,function(e){if(d&&"slot"===e.localName&&r.push(e),s){var t=a;pt()&&(t&&yt(e,t),(t=pt())&&t.scopeNode(e,o))}})),("slot"===this.localName||r.length)&&(r.length&&(n.f=n.f||[],n.a=n.a||[],n.b=n.b||{},n.f.push.apply(n.f,r instanceof Array?r:function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(l(r)))),n&&be(n)),g(this)&&(function(e,t,n){G(t);var r=f(t);if(void 0!==r.firstChild&&(r.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){r=e.__shady_childNodes;for(var o=0;o<r.length;o++)q(r[o],t,n);t=void 0!==(e=f(e)).firstChild?null:void 0,e.firstChild=e.lastChild=t,e.childNodes=t}else q(e,t,n)}(e,this,t),n=p(this),b(this)?(be(n.root),i=!1):n.root&&(i=!1)),i?(n=m(this)?this.host:this,t?(t=function e(t){var n=t;return t&&"slot"===t.localName&&(n=(n=(n=p(t))&&n.h)&&n.length?n[0]:e(t.__shady_nextSibling)),n}(t),n.__shady_native_insertBefore(e,t)):n.__shady_native_appendChild(e)):e.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(e),$(this,e),e},appendChild:function(e){return this.__shady_insertBefore(e)},removeChild:function(e,t){if(t=void 0!==t&&t,this.ownerDocument!==z)return this.__shady_native_removeChild(e);if(e.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+e);var n=De(e),r=n&&function(e,t){if(e.a){Te(e);var n,r=e.b;for(n in r)for(var o=r[n],i=0;i<o.length;i++){var a=o[i];if(M(t,a)){o.splice(i,1);var s=e.a.indexOf(a);if(0<=s&&(e.a.splice(s,1),(s=p(a.__shady_parentNode))&&s.o&&s.o--),i--,a=p(a),s=a.h)for(var d=0;d<s.length;d++){var l=s[d],u=l.__shady_native_parentNode;u&&u.__shady_native_removeChild(l)}a.h=[],a.assignedNodes=[],s=!0}}return s}}(n,e),o=p(this);if(g(this)&&(function(e,t){var n=f(e);e===(t=f(t)).firstChild&&(t.firstChild=n.nextSibling),e===t.lastChild&&(t.lastChild=n.previousSibling),e=n.previousSibling;var r=n.nextSibling;e&&(f(e).nextSibling=r),r&&(f(r).previousSibling=e),n.parentNode=n.previousSibling=n.nextSibling=void 0,void 0!==t.childNodes&&(t.childNodes=null)}(e,this),b(this))){be(o.root);var i=!0}if(pt()&&!t&&n){var a=vt(e);gt(e,function(e){yt(e,a)})}return function e(t){var n=p(t);if(n&&void 0!==n.l)for(var r,o=0,i=(n=t.__shady_childNodes).length;o<i&&(r=n[o]);o++)e(r);(t=p(t))&&(t.l=void 0)}(e),n&&((t=this&&"slot"===this.localName)&&(i=!0),(r||t)&&be(n)),i||(i=m(this)?this.host:this,(!o.root&&"slot"!==e.localName||i===e.__shady_native_parentNode)&&i.__shady_native_removeChild(e)),$(this,null,e),e},replaceChild:function(e,t){return this.__shady_insertBefore(e,t),this.__shady_removeChild(t),e},cloneNode:function(e){if("template"==this.localName)return this.__shady_native_cloneNode(e);var t=this.__shady_native_cloneNode(!1);if(e&&t.nodeType!==Node.ATTRIBUTE_NODE){e=this.__shady_childNodes;for(var n,r=0;r<e.length;r++)n=e[r].__shady_cloneNode(!0),t.__shady_appendChild(n)}return t},getRootNode:function(e){if(this&&this.nodeType){var t=f(this),n=t.l;return void 0===n&&(m(this)?(n=this,t.l=n):(n=(n=this.__shady_parentNode)?n.__shady_getRootNode(e):this,document.documentElement.__shady_native_contains(this)&&(t.l=n))),n}},contains:function(e){return M(this,e)}});function Y(e,t,n){var r=[];return function e(t,n,r,o){for(var i,a=0,s=t.length;a<s&&(i=t[a]);a++){var d;if(d=i.nodeType===Node.ELEMENT_NODE){var l=n,u=r,h=o,c=l(d=i);c&&h.push(d),u&&u(c)?d=c:(e(d.__shady_childNodes,l,u,h),d=void 0)}if(d)break}}(e.__shady_childNodes,t,n,r),r}var Z=D({get firstElementChild(){var e=p(this);if(e&&void 0!==e.firstChild){for(e=this.__shady_firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_nextSibling;return e}return this.__shady_native_firstElementChild},get lastElementChild(){var e=p(this);if(e&&void 0!==e.lastChild){for(e=this.__shady_lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_previousSibling;return e}return this.__shady_native_lastElementChild},get children(){return g(this)?x(Array.prototype.filter.call(this.__shady_childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var e=this.__shady_children;return e?e.length:0}}),ee=D({querySelector:function(e){return Y(this,function(t){return E.call(t,e)},function(e){return!!e})[0]||null},querySelectorAll:function(e,t){if(t){t=Array.prototype.slice.call(this.__shady_native_querySelectorAll(e));var n=this.__shady_getRootNode();return t.filter(function(e){return e.__shady_getRootNode()==n})}return Y(this,function(t){return E.call(t,e)})}}),te=y.K?Object.assign({},Z):Z;Object.assign(Z,ee);var ne=D({getElementById:function(e){return""===e?null:Y(this,function(t){return t.id==e},function(e){return!!e})[0]||null}}),re=D({get activeElement(){var e=y.c?document.__shady_native_activeElement:document.activeElement;if(!e||!e.nodeType)return null;var t=!!m(this);if(!(this===document||t&&this.host!==e&&this.host.__shady_native_contains(e)))return null;for(t=De(e);t&&t!==this;)t=De(e=t.host);return this===document?t?null:e:t===this?e:null}}),oe=/[&\u00A0"]/g,ie=/[&\u00A0<>]/g;function ae(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function se(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var de=se("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),le=se("style script xmp iframe noembed noframes plaintext noscript".split(" "));function ue(e,t){"template"===e.localName&&(e=e.content);for(var n,r="",o=t?t(e):e.childNodes,i=0,a=o.length;i<a&&(n=o[i]);i++){e:{var s=n,d=e,l=t;switch(s.nodeType){case Node.ELEMENT_NODE:for(var u=s.localName,h="<"+u,c=s.attributes,_=0;d=c[_];_++)h+=" "+d.name+'="'+d.value.replace(oe,ae)+'"';h+=">",s=de[u]?h:h+ue(s,l)+"</"+u+">";break e;case Node.TEXT_NODE:s=s.data,s=d&&le[d.localName]?s:s.replace(ie,ae);break e;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break e;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}var he=document.implementation.createHTMLDocument("inert"),ce=D({get innerHTML(){return g(this)?ue("template"===this.localName?this.content:this,function(e){return e.__shady_childNodes}):this.__shady_native_innerHTML},set innerHTML(e){if("template"===this.localName)this.__shady_native_innerHTML=e;else{X(this);var t=this.localName||"div";for(t=this.namespaceURI&&this.namespaceURI!==he.namespaceURI?he.createElementNS(this.namespaceURI,t):he.createElement(t),y.c?t.__shady_native_innerHTML=e:t.innerHTML=e;e=t.__shady_firstChild;)this.__shady_insertBefore(e)}}}),_e=D({addEventListener:function(e,t,n){"object"!=typeof n&&(n={capture:!!n}),n.D=this,this.host.__shady_addEventListener(e,t,n)},removeEventListener:function(e,t,n){"object"!=typeof n&&(n={capture:!!n}),n.D=this,this.host.__shady_removeEventListener(e,t,n)}});function fe(e,t){P(e,_e,t),P(e,re,t),P(e,ce,t),P(e,Z,t),y.j&&!t?(P(e,Q,t),P(e,ne,t)):y.c||(P(e,I),P(e,H))}var pe,ye={},ve=y.deferConnectionCallbacks&&"loading"===document.readyState;function ge(e){var t=[];do{t.unshift(e)}while(e=e.__shady_parentNode);return t}function me(e,t,n){if(e!==ye)throw new TypeError("Illegal constructor");if(this.R="ShadyRoot",this.host=t,this.mode=n&&n.mode,W(t),(e=f(t)).root=this,e.L="closed"!==this.mode?this:null,(e=f(this)).firstChild=e.lastChild=e.parentNode=e.nextSibling=e.previousSibling=null,e.childNodes=[],this.F=this.g=!1,this.f=this.b=this.a=null,y.preferPerformance)for(;e=t.__shady_native_firstChild;)t.__shady_native_removeChild(e);else be(this)}function be(e){e.g||(e.g=!0,A(function(){return Ne(e)}))}function Ne(e){var t;if(t=e.g){for(var n;e;)e.g&&(n=e),m(e=(t=e).host.__shady_getRootNode())&&(t=p(t.host))&&0<t.o||(e=void 0);t=n}(n=t)&&n._renderSelf()}function Ee(e,t,n){var r=f(t),o=r.u;r.u=null,n||(n=(e=e.b[t.__shady_slot||"__catchall"])&&e[0]),n?(f(n).assignedNodes.push(t),r.assignedSlot=n):r.assignedSlot=void 0,o!==r.assignedSlot&&r.assignedSlot&&(f(r.assignedSlot).A=!0)}function we(e,t,n){for(var r,o=0;o<n.length&&(r=n[o]);o++)if("slot"==r.localName){var i=p(r).assignedNodes;i&&i.length&&we(e,t,i)}else t.push(n[o])}function Ce(e,t){t.__shady_native_dispatchEvent(new Event("slotchange")),(t=p(t)).assignedSlot&&Ce(e,t.assignedSlot)}function Te(e){if(e.f&&e.f.length){for(var t,n=e.f,r=0;r<n.length;r++){var o=n[r];W(o);var i=o.__shady_parentNode;W(i),(i=p(i)).o=(i.o||0)+1,i=Se(o),e.b[i]?((t=t||{})[i]=!0,e.b[i].push(o)):e.b[i]=[o],e.a.push(o)}if(t)for(var a in t)e.b[a]=Oe(e.b[a]);e.f=[]}}function Se(e){var t=e.name||e.getAttribute("name")||"__catchall";return e.O=t}function Oe(e){return e.sort(function(e,t){e=ge(e);for(var n=ge(t),r=0;r<e.length;r++){t=e[r];var o=n[r];if(t!==o)return(e=Array.from(t.__shady_parentNode.__shady_childNodes)).indexOf(t)-e.indexOf(o)}})}function Me(e){return Te(e),!(!e.a||!e.a.length)}if(me.prototype._renderSelf=function(){var e=ve;if(ve=!0,this.g=!1,this.a){Te(this);for(var t,n=0;n<this.a.length;n++){var r=p(t=this.a[n]),o=r.assignedNodes;if(r.assignedNodes=[],r.h=[],r.G=o)for(r=0;r<o.length;r++){var i=p(o[r]);i.u=i.assignedSlot,i.assignedSlot===t&&(i.assignedSlot=null)}}for(t=this.host.__shady_firstChild;t;t=t.__shady_nextSibling)Ee(this,t);for(n=0;n<this.a.length;n++){if(!(o=p(t=this.a[n])).assignedNodes.length)for(r=t.__shady_firstChild;r;r=r.__shady_nextSibling)Ee(this,r,t);if((r=(r=p(t.__shady_parentNode))&&r.root)&&(Me(r)||r.g)&&r._renderSelf(),we(this,o.h,o.assignedNodes),r=o.G){for(i=0;i<r.length;i++)p(r[i]).u=null;o.G=null,r.length>o.assignedNodes.length&&(o.A=!0)}o.A&&(o.A=!1,Ce(this,t))}for(n=this.a,t=[],o=0;o<n.length;o++)(i=p(r=n[o].__shady_parentNode))&&i.root||!(0>t.indexOf(r))||t.push(r);for(n=0;n<t.length;n++){r=(o=t[n])===this?this.host:o,i=[],o=o.__shady_childNodes;for(var a=0;a<o.length;a++){var s=o[a];if("slot"==s.localName){s=p(s).h;for(var d=0;d<s.length;d++)i.push(s[d])}else i.push(s)}o=void 0,a=Array.prototype.slice.call(r.__shady_native_childNodes),s=h(i,i.length,a,a.length);for(var l=d=0;d<s.length&&(o=s[d]);d++){for(var u,c=0;c<o.m.length&&(u=o.m[c]);c++)u.__shady_native_parentNode===r&&r.__shady_native_removeChild(u),a.splice(o.index+l,1);l-=o.v}for(l=0;l<s.length&&(o=s[l]);l++)for(d=a[o.index],c=o.index;c<o.index+o.v;c++)u=i[c],r.__shady_native_insertBefore(u,d),a.splice(c,0,u)}}if(!y.preferPerformance&&!this.F)for(t=0,n=(u=this.host.__shady_childNodes).length;t<n;t++)r=p(o=u[t]),o.__shady_native_parentNode!==this.host||"slot"!==o.localName&&r.assignedSlot||this.host.__shady_native_removeChild(o);this.F=!0,ve=e,pe&&pe()},function(e){e.__proto__=DocumentFragment.prototype,fe(e,"__shady_"),fe(e),Object.defineProperties(e,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}}),["localName","namespaceURI","prefix"].forEach(function(t){Object.defineProperty(e,t,{value:void 0,configurable:!0})}),["ownerDocument","baseURI","isConnected"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.host[t]},configurable:!0})})}(me.prototype),window.customElements&&y.H&&!y.preferPerformance){var xe=new Map;pe=function(){var e=[];xe.forEach(function(t,n){e.push([n,t])}),xe.clear();for(var t=0;t<e.length;t++){var n=e[t][0];e[t][1]?n.M():n.N()}},ve&&document.addEventListener("readystatechange",function(){ve=!1,pe()},{once:!0});var Pe=window.customElements.define;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:function(e,t){var n=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;Pe.call(window.customElements,e,function(e,t,n){var r=0,o="__isConnected"+r++;return(t||n)&&(e.prototype.connectedCallback=e.prototype.M=function(){ve?xe.set(this,!0):this[o]||(this[o]=!0,t&&t.call(this))},e.prototype.disconnectedCallback=e.prototype.N=function(){ve?this.isConnected||xe.set(this,!1):this[o]&&(this[o]=!1,n&&n.call(this))}),e}(t,n,r)),t.prototype.connectedCallback=n,t.prototype.disconnectedCallback=r}})}function De(e){if(m(e=e.__shady_getRootNode()))return e}function Le(){this.a=!1,this.addedNodes=[],this.removedNodes=[],this.w=new Set}Le.prototype.flush=function(){if(this.a){this.a=!1;var e=this.takeRecords();e.length&&this.w.forEach(function(t){t(e)})}},Le.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var e=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],e}return[]};var je="__eventWrappers"+Date.now(),Ae=function(){var e=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return e?function(t){return e.get.call(t)}:null}(),ke={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Re={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function He(e){return e instanceof Node?e.__shady_getRootNode():e}function Ie(e,t){var n=[],r=e;for(e=He(e);r;)n.push(r),r=r.__shady_assignedSlot?r.__shady_assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(t||r!==e)?r.host:r.__shady_parentNode;return n[n.length-1]===document&&n.push(window),n}function Fe(e,t){if(!m)return e;e=Ie(e,!0);for(var n,r,o,i,a=0;a<t.length;a++)if((o=He(n=t[a]))!==r&&(i=e.indexOf(o),r=o),!m(o)||-1<i)return n}function Ue(e){function t(t,n){return(t=new e(t,n)).__composed=n&&!!n.composed,t}return t.__proto__=e,t.prototype=e.prototype,t}var Be={focus:!0,blur:!0};function Ge(e){return e.__target!==e.target||e.__relatedTarget!==e.relatedTarget}function qe(e,t,n){if(n=t.__handlers&&t.__handlers[e.type]&&t.__handlers[e.type][n])for(var r,o=0;(r=n[o])&&(!Ge(e)||e.target!==e.relatedTarget)&&(r.call(t,e),!e.__immediatePropagationStopped);o++);}function We(e){var t,n=e.composedPath();Object.defineProperty(e,"currentTarget",{get:function(){return o},configurable:!0});for(var r=n.length-1;0<=r;r--){var o=n[r];if(qe(e,o,"capture"),e.C)return}for(Object.defineProperty(e,"eventPhase",{get:function(){return Event.AT_TARGET}}),r=0;r<n.length;r++){var i=p(o=n[r]);if(i=i&&i.root,(0===r||i&&i===t)&&(qe(e,o,"bubble"),o!==window&&(t=o.__shady_getRootNode()),e.C))break}}function ze(e,t,n,r,o,i){for(var a=0;a<e.length;a++){var s=e[a],d=s.type,l=s.capture,u=s.once,h=s.passive;if(t===s.node&&n===d&&r===l&&o===u&&i===h)return a}return-1}function Ve(e,t,n){if(t){var r=typeof t;if(("function"===r||"object"===r)&&("object"!==r||t.handleEvent&&"function"==typeof t.handleEvent)){if(Re[e])return this.__shady_native_addEventListener(e,t,n);if(n&&"object"==typeof n)var o=!!n.capture,i=!!n.once,a=!!n.passive;else o=!!n,a=i=!1;var s=n&&n.D||this,d=t[je];if(d){if(-1<ze(d,s,e,o,i,a))return}else t[je]=[];d=function(o){if(i&&this.__shady_removeEventListener(e,t,n),o.__target||Xe(o),s!==this){var a=Object.getOwnPropertyDescriptor(o,"currentTarget");Object.defineProperty(o,"currentTarget",{get:function(){return s},configurable:!0})}if(o.__previousCurrentTarget=o.currentTarget,(!m(s)||-1!=o.composedPath().indexOf(s))&&(o.composed||-1<o.composedPath().indexOf(s)))if(Ge(o)&&o.target===o.relatedTarget)o.eventPhase===Event.BUBBLING_PHASE&&o.stopImmediatePropagation();else if(o.eventPhase===Event.CAPTURING_PHASE||o.bubbles||o.target===s||s instanceof Window){var d="function"===r?t.call(s,o):t.handleEvent&&t.handleEvent(o);return s!==this&&(a?(Object.defineProperty(o,"currentTarget",a),a=null):delete o.currentTarget),d}},t[je].push({node:s,type:e,capture:o,once:i,passive:a,V:d}),Be[e]?(this.__handlers=this.__handlers||{},this.__handlers[e]=this.__handlers[e]||{capture:[],bubble:[]},this.__handlers[e][o?"capture":"bubble"].push(d)):this.__shady_native_addEventListener(e,d,n)}}}function Je(e,t,n){if(t){if(Re[e])return this.__shady_native_removeEventListener(e,t,n);if(n&&"object"==typeof n)var r=!!n.capture,o=!!n.once,i=!!n.passive;else r=!!n,i=o=!1;var a=n&&n.D||this,s=void 0,d=null;try{d=t[je]}catch(e){}d&&(-1<(o=ze(d,a,e,r,o,i))&&(s=d.splice(o,1)[0].V,d.length||(t[je]=void 0))),this.__shady_native_removeEventListener(e,s||t,n),s&&Be[e]&&this.__handlers&&this.__handlers[e]&&(-1<(s=(e=this.__handlers[e][r?"capture":"bubble"]).indexOf(s))&&e.splice(s,1))}}var Ke=D({get composed(){return void 0===this.__composed&&(Ae?this.__composed="focusin"===this.type||"focusout"===this.type||Ae(this):!1!==this.isTrusted&&(this.__composed=ke[this.type])),this.__composed||!1},composedPath:function(){return this.__composedPath||(this.__composedPath=Ie(this.__target,this.composed)),this.__composedPath},get target(){return Fe(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=Ie(this.__relatedTarget,!0)),Fe(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.C=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.C=this.__immediatePropagationStopped=!0}});function Xe(e){if(e.__target=e.target,e.__relatedTarget=e.relatedTarget,y.c){var t=Object.getPrototypeOf(e);if(!Object.hasOwnProperty(t,"__shady_patchedProto")){var n=Object.create(t);n.__shady_sourceProto=t,P(n,Ke),t.__shady_patchedProto=n}e.__proto__=t.__shady_patchedProto}else P(e,Ke)}var $e=Ue(Event),Qe=Ue(CustomEvent),Ye=Ue(MouseEvent);var Ze=Object.getOwnPropertyNames(Document.prototype).filter(function(e){return"on"===e.substring(0,2)}),et=y.c,tt={querySelector:function(e){return this.__shady_native_querySelector(e)},querySelectorAll:function(e){return this.__shady_native_querySelectorAll(e)}},nt={};function rt(e){nt[e]=function(t){return t["__shady_native_"+e]}}function ot(e,t){for(var n in P(e,t,"__shady_native_"),t)rt(n)}function it(e,t){t=void 0===t?[]:t;for(var n=0;n<t.length;n++){var r=t[n],o=Object.getOwnPropertyDescriptor(e,r);o&&(Object.defineProperty(e,"__shady_native_"+r,o),o.value?tt[r]||(tt[r]=o.value):rt(r))}}var at=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),st=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),dt=document.implementation.createHTMLDocument("inert");function lt(e){for(var t;t=e.__shady_native_firstChild;)e.__shady_native_removeChild(t)}var ut=["firstElementChild","lastElementChild","children","childElementCount"],ht=["querySelector","querySelectorAll"];var ct=D({dispatchEvent:function(e){return k(),this.__shady_native_dispatchEvent(e)},addEventListener:Ve,removeEventListener:Je}),_t=D({get assignedSlot(){var e=this.__shady_parentNode;return(e=e&&e.__shady_shadowRoot)&&Ne(e),(e=p(this))&&e.assignedSlot||null}}),ft=null;function pt(){return ft||(ft=window.ShadyCSS&&window.ShadyCSS.ScopingShim),ft||null}function yt(e,t){var n=pt();n&&n.unscopeNode(e,t)}function vt(e){if(e.nodeType!==Node.ELEMENT_NODE)return"";var t=pt();return t?t.currentScopeForNode(e):""}function gt(e,t){if(e){e.nodeType===Node.ELEMENT_NODE&&t(e),e=e.__shady_childNodes;for(var n,r=0;r<e.length;r++)(n=e[r]).nodeType===Node.ELEMENT_NODE&>(n,t)}}var mt=window.document;function bt(e,t){if("slot"===t)b(e=e.__shady_parentNode)&&be(p(e).root);else if("slot"===e.localName&&"name"===t&&(t=De(e))){if(t.a){Te(t);var n=e.O,r=Se(e);if(r!==n){var o=(n=t.b[n]).indexOf(e);0<=o&&n.splice(o,1),(n=t.b[r]||(t.b[r]=[])).push(e),1<n.length&&(t.b[r]=Oe(n))}}be(t)}}var Nt=D({get previousElementSibling(){var e=p(this);if(e&&void 0!==e.previousSibling){for(e=this.__shady_previousSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_previousSibling;return e}return this.__shady_native_previousElementSibling},get nextElementSibling(){var e=p(this);if(e&&void 0!==e.nextSibling){for(e=this.__shady_nextSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_nextSibling;return e}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")},set slot(e){this.__shady_setAttribute("slot",e)},get shadowRoot(){var e=p(this);return e&&e.L||null},get className(){return this.getAttribute("class")||""},set className(e){this.__shady_setAttribute("class",e)},setAttribute:function(e,t){var n;this.ownerDocument!==mt?this.__shady_native_setAttribute(e,t):((n=pt())&&"class"===e?(n.setElementClass(this,t),n=!0):n=!1,n||(this.__shady_native_setAttribute(e,t),bt(this,e)))},removeAttribute:function(e){this.__shady_native_removeAttribute(e),bt(this,e)},attachShadow:function(e){if(!this)throw Error("Must provide a host.");if(!e)throw Error("Not enough arguments.");return new me(ye,this,e)}}),Et=D({blur:function(){var e=p(this);(e=(e=e&&e.root)&&e.activeElement)?e.__shady_blur():this.__shady_native_blur()}});Ze.forEach(function(e){Et[e]={set:function(t){var n=f(this),r=e.substring(2);n.s[e]&&this.removeEventListener(r,n.s[e]),this.__shady_addEventListener(r,t),n.s[e]=t},get:function(){var t=p(this);return t&&t.s[e]},configurable:!0}});var wt=D({assignedNodes:function(e){if("slot"===this.localName){var t=this.__shady_getRootNode();return t&&m(t)&&Ne(t),(t=p(this))&&(e&&e.flatten?t.h:t.assignedNodes)||[]}}}),Ct=window.document,Tt=D({importNode:function(e,t){if(e.ownerDocument!==Ct||"template"===e.localName)return this.__shady_native_importNode(e,t);var n=this.__shady_native_importNode(e,!1);if(t){e=e.__shady_childNodes,t=0;for(var r;t<e.length;t++)r=this.__shady_importNode(e[t],!0),n.__shady_appendChild(r)}return n}}),St=D({addEventListener:Ve.bind(window),removeEventListener:Je.bind(window)}),Ot={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Ot.parentElement=Q.parentElement),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Ot.contains=Q.contains),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Ot.children=Z.children),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Ot.innerHTML=ce.innerHTML),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Ot.className=Nt.className);var Mt={EventTarget:[ct],Node:[Q,window.EventTarget?null:ct],Text:[_t],Element:[Nt,Z,_t,!y.c||"innerHTML"in Element.prototype?ce:null,window.HTMLSlotElement?null:wt],HTMLElement:[Et,Ot],HTMLSlotElement:[wt],DocumentFragment:[te,ne],Document:[Tt,te,ne,re],Window:[St]},xt=y.c?null:["innerHTML","textContent"];function Pt(e){var t,n=e?null:xt,r={};for(t in Mt)r.B=window[t]&&window[t].prototype,Mt[t].forEach(function(t){return function(r){return t.B&&r&&P(t.B,r,e,n)}}(r)),r={B:r.B}}function Dt(e){this.node=e}(t=Dt.prototype).addEventListener=function(e,t,n){return this.node.__shady_addEventListener(e,t,n)},t.removeEventListener=function(e,t,n){return this.node.__shady_removeEventListener(e,t,n)},t.appendChild=function(e){return this.node.__shady_appendChild(e)},t.insertBefore=function(e,t){return this.node.__shady_insertBefore(e,t)},t.removeChild=function(e){return this.node.__shady_removeChild(e)},t.replaceChild=function(e,t){return this.node.__shady_replaceChild(e,t)},t.cloneNode=function(e){return this.node.__shady_cloneNode(e)},t.getRootNode=function(e){return this.node.__shady_getRootNode(e)},t.contains=function(e){return this.node.__shady_contains(e)},t.dispatchEvent=function(e){return this.node.__shady_dispatchEvent(e)},t.setAttribute=function(e,t){this.node.__shady_setAttribute(e,t)},t.getAttribute=function(e){return this.node.__shady_native_getAttribute(e)},t.removeAttribute=function(e){this.node.__shady_removeAttribute(e)},t.attachShadow=function(e){return this.node.__shady_attachShadow(e)},t.focus=function(){this.node.__shady_native_focus()},t.blur=function(){this.node.__shady_blur()},t.importNode=function(e,t){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(e,t)},t.getElementById=function(e){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(e)},t.querySelector=function(e){return this.node.__shady_querySelector(e)},t.querySelectorAll=function(e,t){return this.node.__shady_querySelectorAll(e,t)},t.assignedNodes=function(e){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(e)},n.Object.defineProperties(Dt.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(m(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(m(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentElement}},firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}},children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}},childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(e){this.node.__shady_innerHTML=e}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(e){this.node.__shady_textContent=e}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(e){this.node.__shady_slot=e}}}),Ze.forEach(function(e){Object.defineProperty(Dt.prototype,e,{get:function(){return this.node["__shady_"+e]},set:function(t){this.node["__shady_"+e]=t},configurable:!0})});var Lt=new WeakMap;y.H&&(window.ShadyDOM={inUse:y.H,patch:function(e){return G(e),B(e),e},isShadyRoot:m,enqueue:A,flush:k,flushInitial:function(e){!e.F&&e.g&&Ne(e)},settings:y,filterMutations:function(e,t){var n=t.getRootNode();return e.map(function(e){var t=n===e.target.getRootNode();if(t&&e.addedNodes){if((t=Array.from(e.addedNodes).filter(function(e){return n===e.getRootNode()})).length)return e=Object.create(e),Object.defineProperty(e,"addedNodes",{value:t,configurable:!0}),e}else if(t)return e}).filter(function(e){return e})},observeChildren:function(e,t){var n=f(e);n.i||(n.i=new Le),n.i.w.add(t);var r=n.i;return{P:t,T:r,S:e,takeRecords:function(){return r.takeRecords()}}},unobserveChildren:function(e){var t=e&&e.T;t&&(t.w.delete(e.P),t.w.size||(f(e.S).i=null))},deferConnectionCallbacks:y.deferConnectionCallbacks,preferPerformance:y.preferPerformance,handlesDynamicScoping:!0,wrap:y.j?function(e){if(m(e)||e instanceof Dt)return e;var t=Lt.get(e);return t||(t=new Dt(e),Lt.set(e,t)),t}:function(e){return e},Wrapper:Dt,composedPath:function(e){return e.__composedPath||(e.__composedPath=Ie(e.target,!0)),e.__composedPath},noPatch:y.j,nativeMethods:tt,nativeTree:nt},function(){var e=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?it(window.EventTarget.prototype,e):(it(Node.prototype,e),it(Window.prototype,e)),et?it(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):ot(Node.prototype,{parentNode:{get:function(){return at.currentNode=this,at.parentNode()}},firstChild:{get:function(){return at.currentNode=this,at.firstChild()}},lastChild:{get:function(){return at.currentNode=this,at.lastChild()}},previousSibling:{get:function(){return at.currentNode=this,at.previousSibling()}},nextSibling:{get:function(){return at.currentNode=this,at.nextSibling()}},childNodes:{get:function(){var e=[];at.currentNode=this;for(var t=at.firstChild();t;)e.push(t),t=at.nextSibling();return e}},parentElement:{get:function(){return st.currentNode=this,st.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var e,t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT,null,!1),n="";e=t.nextNode();)n+=e.nodeValue;return n;default:return this.nodeValue}},set:function(e){switch(null==e&&(e=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:lt(this),(0<e.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(e),void 0);break;default:this.nodeValue=e}}}}),it(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")),e={firstElementChild:{get:function(){return st.currentNode=this,st.firstChild()}},lastElementChild:{get:function(){return st.currentNode=this,st.lastChild()}},children:{get:function(){var e=[];st.currentNode=this;for(var t=st.firstChild();t;)e.push(t),t=st.nextSibling();return x(e)}},childElementCount:{get:function(){return this.children?this.children.length:0}}},et?(it(Element.prototype,ut),it(Element.prototype,["previousElementSibling","nextElementSibling","innerHTML"]),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&it(HTMLElement.prototype,["children"]),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&it(HTMLElement.prototype,["innerHTML"])):(ot(Element.prototype,e),ot(Element.prototype,{previousElementSibling:{get:function(){return st.currentNode=this,st.previousSibling()}},nextElementSibling:{get:function(){return st.currentNode=this,st.nextSibling()}},innerHTML:{get:function(){return ue(this,function(e){return e.__shady_native_childNodes})},set:function(e){var t="template"===this.localName?this.content:this;lt(t);var n=this.localName||"div";for((n=this.namespaceURI&&this.namespaceURI!==dt.namespaceURI?dt.createElementNS(this.namespaceURI,n):dt.createElement(n)).innerHTML=e,e="template"===this.localName?n.content:n;n=e.__shady_native_firstChild;)t.__shady_native_insertBefore(n,void 0)}}})),it(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute focus blur".split(" ")),it(Element.prototype,ht),it(HTMLElement.prototype,["focus","blur","contains"]),et&&it(HTMLElement.prototype,["parentElement","children","innerHTML"]),window.HTMLTemplateElement&&it(window.HTMLTemplateElement.prototype,["innerHTML"]),et?it(DocumentFragment.prototype,ut):ot(DocumentFragment.prototype,e),it(DocumentFragment.prototype,ht),et?(it(Document.prototype,ut),it(Document.prototype,["activeElement"])):ot(Document.prototype,e),it(Document.prototype,["importNode","getElementById"]),it(Document.prototype,ht)}(),Pt("__shady_"),Object.defineProperty(document,"_activeElement",re.activeElement),P(Window.prototype,St,"__shady_"),y.j||(Pt(),function(){if(!Ae&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var e=function(){var e=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(e)};Element.prototype.click?Element.prototype.click=e:HTMLElement.prototype.click&&(HTMLElement.prototype.click=e)}}()),function(){for(var e in Be)window.__shady_native_addEventListener(e,function(e){e.__target||(Xe(e),We(e))},!0)}(),window.Event=$e,window.CustomEvent=Qe,window.MouseEvent=Ye,window.ShadowRoot=me)}).call(this)}).call(this,n(2))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);if(/\/episode\/.*\.html$/i.test(location.href)){var o=Array.from(document.querySelectorAll("#myTable>tbody>tr"));if(o.length)for(var i=function(e){setTimeout(function(){var t=e.querySelector(".watchlink");if(!t)return console.error("Cannot find watch link. Row included below:"),void console.error(e);var n=t.getAttribute("href");if(!n)return console.error("Watch link element does not contain a href"),void console.error(t);if(!n.includes("//watch.")){var o=e.querySelector("td:nth-child(2)");o.innerHTML="";var i=new r.DirectLink;o.appendChild(i.element);try{var a=n.split("?")[1];i.href=atob(a.substr(2)),i.state=1}catch(e){console.error(e),i.state=2}}},0)},a=0,s=o;a<s.length;a++){i(s[a])}else console.warn("No rows found")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(6),i=n(7),a=Symbol("State"),s=n(8),d=function(){function e(e){this.attachTo=e,this.stateChanged()}var t;return Object.defineProperty(e.prototype,"element",{get:function(){return this.attachTo?this.attachTo:document.createElement("div")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"href",{get:function(){return this.a.getAttribute("href")||""},set:function(e){this.a.setAttribute("href",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this[a]},set:function(e){this.prevState=this[a],this[a]=e,this.stateChanged()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a",{get:function(){var e=document.createElement("a");return e.rel="noopener nofollow",e.target="_blank",e.innerText="Direct Link",e.setAttribute("class","link loaded"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorEl",{get:function(){var e=document.createElement("span");return e.innerText="Error loading direct link",e.setAttribute("class","link errored"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loadingEl",{get:function(){var e=document.createElement("span");return e.innerText="Loading direct link...",e.setAttribute("class","link loading"),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shadow",{get:function(){return this.element.attachShadow({mode:"closed"})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){var e=document.createElement("style");return e.innerHTML=s,e},enumerable:!0,configurable:!0}),e.prototype.stateChanged=function(){if(this.state!==this.prevState)switch(this.shadow.innerHTML="",this.shadow.appendChild(this.style),this.state){case 0:this.shadow.appendChild(this.loadingEl);break;case 2:this.shadow.appendChild(this.errorEl);break;case 1:this.shadow.appendChild(this.a);break;default:throw new Error("Invalid direct link state: "+this.state)}},t=a,r.__decorate([i.Proto(0)],e.prototype,t,void 0),r.__decorate([o.LazyGetter()],e.prototype,"element",null),r.__decorate([o.LazyGetter()],e.prototype,"a",null),r.__decorate([o.LazyGetter()],e.prototype,"errorEl",null),r.__decorate([o.LazyGetter()],e.prototype,"loadingEl",null),r.__decorate([o.LazyGetter()],e.prototype,"shadow",null),r.__decorate([o.LazyGetter()],e.prototype,"style",null),e}();t.DirectLink=d},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return o}),n.d(t,"__assign",function(){return i}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return s}),n.d(t,"__param",function(){return d}),n.d(t,"__metadata",function(){return l}),n.d(t,"__awaiter",function(){return u}),n.d(t,"__generator",function(){return h}),n.d(t,"__exportStar",function(){return c}),n.d(t,"__values",function(){return _}),n.d(t,"__read",function(){return f}),n.d(t,"__spread",function(){return p}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return v}),n.d(t,"__asyncDelegator",function(){return g}),n.d(t,"__asyncValues",function(){return m}),n.d(t,"__makeTemplateObject",function(){return b}),n.d(t,"__importStar",function(){return N}),n.d(t,"__importDefault",function(){return E});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function d(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function s(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}d((r=r.apply(e,t||[])).next())})}function h(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function _(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(d,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function d(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function g(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function m(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";function r(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!1),function(n,r,o){o||(o=Object.getOwnPropertyDescriptor(n,r));var i=o.get;if(!i)throw new Error("@LazyGetter can only decorate getters!");if(!o.configurable)throw new Error("@LazyGetter target must be configurable");o.get=function(){var a=i.apply(this,arguments),s={configurable:!t,enumerable:o.enumerable,value:a},d=Object.getPrototypeOf(n)===Function.prototype;return(d||e)&&Object.defineProperty(n,r,s),d||Object.defineProperty(this,r,s),a}}}n.r(t),n.d(t,"LazyGetter",function(){return r})},function(e,t,n){"use strict";function r(e,t){return function(n,r){var o=Object.assign({configurable:!0,enumerable:!0,value:e,writable:!0},t);Object.defineProperty(n.constructor.prototype,r,o)}}n.r(t),n.d(t,"Proto",function(){return r}),r.hidden=function(e){return r(e,{enumerable:!1})},r.immutable=function(e){return r(e,{writable:!1,configurable:!1})},r.immutableHidden=function(e){return r(e,{writable:!1,configurable:!1,enumerable:!1})}},function(e,t){e.exports=".link{display:inline-block;color:#000;padding:2px;cursor:pointer;border-width:1px;border-style:ridge;text-decoration:none}.link.loading{border-color:#808080}.link.loaded{border-color:#00ff00}.link.errored{border-color:#8b0000}\n"}])});})();