Files
asciinema/assets/asciinema-player.min.js

2 lines
158 KiB
JavaScript
Raw Normal View History

2025-10-24 15:38:01 +02:00
var AsciinemaPlayer=function(A){"use strict";function g(A){return"number"==typeof A?A:"string"==typeof A?A.split(":").reverse().map(parseFloat).reduce(((A,g,V)=>A+g*Math.pow(60,V))):void 0}class V{log(){}debug(){}info(){}warn(){}error(){}}class e{constructor(A,g){this.logger=A,this.prefix=g}log(A){for(var g=arguments.length,V=new Array(g>1?g-1:0),e=1;e<g;e++)V[e-1]=arguments[e];this.logger.log(`${this.prefix}${A}`,...V)}debug(A){for(var g=arguments.length,V=new Array(g>1?g-1:0),e=1;e<g;e++)V[e-1]=arguments[e];this.logger.debug(`${this.prefix}${A}`,...V)}info(A){for(var g=arguments.length,V=new Array(g>1?g-1:0),e=1;e<g;e++)V[e-1]=arguments[e];this.logger.info(`${this.prefix}${A}`,...V)}warn(A){for(var g=arguments.length,V=new Array(g>1?g-1:0),e=1;e<g;e++)V[e-1]=arguments[e];this.logger.warn(`${this.prefix}${A}`,...V)}error(A){for(var g=arguments.length,V=new Array(g>1?g-1:0),e=1;e<g;e++)V[e-1]=arguments[e];this.logger.error(`${this.prefix}${A}`,...V)}}let I;const t=new Array(128).fill(void 0);function B(A){return t[A]}function Q(A){const g=typeof A;if("number"==g||"boolean"==g||null==A)return`${A}`;if("string"==g)return`"${A}"`;if("symbol"==g){const g=A.description;return null==g?"Symbol":`Symbol(${g})`}if("function"==g){const g=A.name;return"string"==typeof g&&g.length>0?`Function(${g})`:"Function"}if(Array.isArray(A)){const g=A.length;let V="[";g>0&&(V+=Q(A[0]));for(let e=1;e<g;e++)V+=", "+Q(A[e]);return V+="]",V}const V=/\[object ([^\]]+)\]/.exec(toString.call(A));let e;if(!(V.length>1))return toString.call(A);if(e=V[1],"Object"==e)try{return"Object("+JSON.stringify(A)+")"}catch(A){return"Object"}return A instanceof Error?`${A.name}: ${A.message}\n${A.stack}`:e}t.push(void 0,null,!0,!1);let C=0,E=null;function o(){return null!==E&&0!==E.byteLength||(E=new Uint8Array(I.memory.buffer)),E}const i="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},n="function"==typeof i.encodeInto?function(A,g){return i.encodeInto(A,g)}:function(A,g){const V=i.encode(A);return g.set(V),{read:A.length,written:V.length}};function r(A,g,V){if(void 0===V){const V=i.encode(A),e=g(V.length,1)>>>0;return o().subarray(e,e+V.length).set(V),C=V.length,e}let e=A.length,I=g(e,1)>>>0;const t=o();let B=0;for(;B<e;B++){const g=A.charCodeAt(B);if(g>127)break;t[I+B]=g}if(B!==e){0!==B&&(A=A.slice(B)),I=V(I,e,e=B+3*A.length,1)>>>0;const g=o().subarray(I+B,I+e);B+=n(A,g).written,I=V(I,e,B,1)>>>0}return C=B,I}let s=null;function a(){return null!==s&&0!==s.byteLength||(s=new Int32Array(I.memory.buffer)),s}let c=t.length;function l(A){const g=B(A);return function(A){A<132||(t[A]=c,c=A)}(A),g}function w(A){c===t.length&&t.push(t.length+1);const g=c;return c=t[g],t[g]=A,g}const u="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};function h(A,g){return A>>>=0,u.decode(o().subarray(A,A+g))}"undefined"!=typeof TextDecoder&&u.decode();let D=null;function d(A,g){return A>>>=0,(null!==D&&0!==D.byteLength||(D=new Uint32Array(I.memory.buffer)),D).subarray(A/4,A/4+g)}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((A=>I.__wbg_vt_free(A>>>0)));class f{static __wrap(A){A>>>=0;const g=Object.create(f.prototype);return g.__wbg_ptr=A,y.register(g,g.__wbg_ptr,g),g}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,y.unregister(this),A}free(){const A=this.__destroy_into_raw();I.__wbg_vt_free(A)}feed(A){const g=r(A,I.__wbindgen_export_0,I.__wbindgen_export_1),V=C;return l(I.vt_feed(this.__wbg_ptr,g,V))}resize(A,g){return l(I.vt_resize(this.__wbg_ptr,A,g))}getSize(){try{const e=I.__wbindgen_add_to_stack_pointer(-16);I.vt_getSize(e,this.__wbg_ptr);var A=a()[e/4+0],g=a()[e/4+1],V=d(A,g).slice();return I.__wbindgen_export_2(A,4*g,4),V}finally{I.__wbindgen_add_to_stack_pointer(16)}}getLine(A){return l(I.vt_getLine(this.__wbg_ptr,A))}getCursor(){return l(I.vt_getCursor(this.__wbg_ptr))}}function q(){const A={wbg:{}};return A.wbg.__wbindgen_is_string=function(A){