mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
2 lines
154 KiB
JavaScript
2 lines
154 KiB
JavaScript
|
|
!function(){"use strict";function A(A){return"number"==typeof A?A:"string"==typeof A?A.split(":").reverse().map(parseFloat).reduce(((A,g,I)=>A+g*Math.pow(60,I))):void 0}class g{constructor(A,g){this.logger=A,this.prefix=g}log(A){for(var g=arguments.length,I=new Array(g>1?g-1:0),B=1;B<g;B++)I[B-1]=arguments[B];this.logger.log(`${this.prefix}${A}`,...I)}debug(A){for(var g=arguments.length,I=new Array(g>1?g-1:0),B=1;B<g;B++)I[B-1]=arguments[B];this.logger.debug(`${this.prefix}${A}`,...I)}info(A){for(var g=arguments.length,I=new Array(g>1?g-1:0),B=1;B<g;B++)I[B-1]=arguments[B];this.logger.info(`${this.prefix}${A}`,...I)}warn(A){for(var g=arguments.length,I=new Array(g>1?g-1:0),B=1;B<g;B++)I[B-1]=arguments[B];this.logger.warn(`${this.prefix}${A}`,...I)}error(A){for(var g=arguments.length,I=new Array(g>1?g-1:0),B=1;B<g;B++)I[B-1]=arguments[B];this.logger.error(`${this.prefix}${A}`,...I)}}let I;const B=new Array(128).fill(void 0);function Q(A){return B[A]}B.push(void 0,null,!0,!1);let C=B.length;function E(A){const g=Q(A);return function(A){A<132||(B[A]=C,C=A)}(A),g}const V="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&V.decode();let i=null;function o(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(I.memory.buffer)),i}function s(A,g){return A>>>=0,V.decode(o().subarray(A,A+g))}function t(A){C===B.length&&B.push(B.length+1);const g=C;return C=B[g],B[g]=A,g}function e(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 I="[";g>0&&(I+=e(A[0]));for(let B=1;B<g;B++)I+=", "+e(A[B]);return I+="]",I}const I=/\[object ([^\]]+)\]/.exec(toString.call(A));let B;if(!(I.length>1))return toString.call(A);if(B=I[1],"Object"==B)try{return"Object("+JSON.stringify(A)+")"}catch(A){return"Object"}return A instanceof Error?`${A.name}: ${A.message}\n${A.stack}`:B}let D=0;const w="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},a="function"==typeof w.encodeInto?function(A,g){return w.encodeInto(A,g)}:function(A,g){const I=w.encode(A);return g.set(I),{read:A.length,written:I.length}};function n(A,g,I){if(void 0===I){const I=w.encode(A),B=g(I.length,1)>>>0;return o().subarray(B,B+I.length).set(I),D=I.length,B}let B=A.length,Q=g(B,1)>>>0;const C=o();let E=0;for(;E<B;E++){const g=A.charCodeAt(E);if(g>127)break;C[Q+E]=g}if(E!==B){0!==E&&(A=A.slice(E)),Q=I(Q,B,B=E+3*A.length,1)>>>0;const g=o().subarray(Q+E,Q+B);E+=a(A,g).written,Q=I(Q,B,E,1)>>>0}return D=E,Q}let r=null;function G(){return null!==r&&0!==r.byteLength||(r=new Int32Array(I.memory.buffer)),r}let c=null;function k(A,g){return A>>>=0,(null!==c&&0!==c.byteLength||(c=new Uint32Array(I.memory.buffer)),c).subarray(A/4,A/4+g)}const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((A=>I.__wbg_vt_free(A>>>0)));class h{static __wrap(A){A>>>=0;const g=Object.create(h.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=n(A,I.__wbindgen_malloc,I.__wbindgen_realloc),B=D;return E(I.vt_feed(this.__wbg_ptr,g,B))}resize(A,g){return E(I.vt_resize(this.__wbg_ptr,A,g))}inspect(){let A,g;try{const C=I.__wbindgen_add_to_stack_pointer(-16);I.vt_inspect(C,this.__wbg_ptr);var B=G()[C/4+0],Q=G()[C/4+1];return A=B,g=Q,s(B,Q)}finally{I.__wbindgen_add_to_stack_pointer(16),I.__wbindgen_free(A,g,1)}}getSize(){try{const Q=I.__wbindgen_add_to_stack_pointer(-16);I.vt_getSize(Q,this.__wbg_ptr);var A=G()[Q/4+0],g=G()[Q/4+1],B=k(A,g).slice();return I.__wbindgen_free(A,4*g,4),B}finally{I.__wbindgen_add_to_stack_pointer(16)}}getLine(A){return E(I.vt_getLin
|