blog/static/assets/asciinema-player.min.js

2 lines
175 KiB
JavaScript
Raw Normal View History

2024-06-27 10:02:29 -04:00
var AsciinemaPlayer=function(A){"use strict";const g={};const I=Symbol("solid-proxy"),B=Symbol("solid-track"),Q={equals:(A,g)=>A===g};let C=q;const E=1,e=2,i={owned:null,cleanups:null,context:null,owner:null};var V=null;let t=null,o=null,s=null,n=null,r=0;function a(A,g){const I=o,B=V,Q=0===A.length,C=Q?i:{owned:null,cleanups:null,context:null,owner:void 0===g?B:g},E=Q?A:()=>A((()=>l((()=>S(C)))));V=C,o=null;try{return R(E,!0)}finally{o=I,V=B}}function c(A,g){const I={value:A,observers:null,observerSlots:null,comparator:(g=g?Object.assign({},Q,g):Q).equals||void 0};return[F.bind(I),A=>("function"==typeof A&&(A=A(I.value)),d(I,A))]}function w(A,g,I){u(N(A,g,!1,E))}function D(A,g,I){I=I?Object.assign({},Q,I):Q;const B=N(A,g,!0,0);return B.observers=null,B.observerSlots=null,B.comparator=I.equals||void 0,u(B),F.bind(B)}function h(A){return R(A,!1)}function l(A){if(null===o)return A();const g=o;o=null;try{return A()}finally{o=g}}function M(A){!function(A,g,I){C=J;const B=N(A,g,!1,E);B.user=!0,n?n.push(B):u(B)}((()=>l(A)))}function y(A){return null===V||(null===V.cleanups?V.cleanups=[A]:V.cleanups.push(A)),A}function G(){return o}function k(A){const g=D(A),I=D((()=>L(g())));return I.toArray=()=>{const A=I();return Array.isArray(A)?A:null!=A?[A]:[]},I}function F(){const A=t;if(this.sources&&(this.state||A))if(this.state===E||A)u(this);else{const A=s;s=null,R((()=>Y(this)),!1),s=A}if(o){const A=this.observers?this.observers.length:0;o.sources?(o.sources.push(this),o.sourceSlots.push(A)):(o.sources=[this],o.sourceSlots=[A]),this.observers?(this.observers.push(o),this.observerSlots.push(o.sources.length-1)):(this.observers=[o],this.observerSlots=[o.sources.length-1])}return this.value}function d(A,g,I){let B=A.value;return A.comparator&&A.comparator(B,g)||(A.value=g,A.observers&&A.observers.length&&R((()=>{for(let g=0;g<A.observers.length;g+=1){const I=A.observers[g],B=t&&t.running;B&&t.disposed.has(I),(B&&!I.tState||!B&&!I.state)&&(I.pure?s.push(I):n.push(I),I.observers&&U(I)),B||(I.state=E)}if(s.length>1e6)throw s=[],new Error}),!1)),g}function u(A){if(!A.fn)return;S(A);const g=V,I=o,B=r;o=V=A,function(A,g,I){let B;try{B=A.fn(g)}catch(g){A.pure&&(A.state=E,A.owned&&A.owned.forEach(S),A.owned=null),p(g)}(!A.updatedAt||A.updatedAt<=I)&&(null!=A.updatedAt&&"observers"in A?d(A,B):A.value=B,A.updatedAt=I)}(A,A.value,B),o=I,V=g}function N(A,g,I,B=E,Q){const C={fn:A,state:B,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:g,owner:V,context:null,pure:I};return null===V||V!==i&&(V.owned?V.owned.push(C):V.owned=[C]),C}function f(A){const g=t;if(0===A.state||g)return;if(A.state===e||g)return Y(A);if(A.suspense&&l(A.suspense.inFallback))return A.suspense.effects.push(A);const I=[A];for(;(A=A.owner)&&(!A.updatedAt||A.updatedAt<r);)(A.state||g)&&I.push(A);for(let B=I.length-1;B>=0;B--)if((A=I[B]).state===E||g)u(A);else if(A.state===e||g){const g=s;s=null,R((()=>Y(A,I[0])),!1),s=g}}function R(A,g){if(s)return A();let I=!1;g||(s=[]),n?I=!0:n=[],r++;try{const g=A();return function(A){s&&(q(s),s=null);if(A)return;const g=n;n=null,g.length&&R((()=>C(g)),!1)}(I),g}catch(A){I||(n=null),s=null,p(A)}}function q(A){for(let g=0;g<A.length;g++)f(A[g])}function J(A){let I,B=0;for(I=0;I<A.length;I++){const g=A[I];g.user?A[B++]=g:f(g)}var Q;for(g.context&&(g.context=Q),I=0;I<B;I++)f(A[I])}function Y(A,g){const I=t;A.state=0;for(let B=0;B<A.sources.length;B+=1){const Q=A.sources[B];Q.sources&&(Q.state===E||I?Q!==g&&f(Q):(Q.state===e||I)&&Y(Q,g))}}function U(A){const g=t;for(let I=0;I<A.observers.length;I+=1){const B=A.observers[I];B.state&&!g||(B.state=e,B.pure?s.push(B):n.push(B),B.observers&&U(B))}}function S(A){let g;if(A.sources)for(;A.sources.length;){const g=A.sources.pop(),I=A.sourceSlots.pop(),B=g.observers;if(B&&B.length){const A=B.pop(),Q=g.observerSlots.pop();I<B.length&&(A.sourceSlots[Q]=I,B[I]=A,g.observerSlots[I]=Q)}}if(A.owned){for(g=0;g<A.owned.length;g++)S(A.owned[g]);A.owned=null}if(A.cleanups){for(g=0;g<A.cleanups.length;g++)A.cleanups[g]();A.cleanups=null}A.state=0,A.context=null}function p(A){throw A=function