1 line
41 KiB
JavaScript
1 line
41 KiB
JavaScript
![]() |
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4946],{5044:()=>{},9195:t=>{var e;self,e=()=>(()=>{"use strict";var t={};return Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let e=this._terminal._core;this._terminal.rows===t.rows&&this._terminal.cols===t.cols||(e._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core,e=t._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let s=0===this._terminal.options.scrollback?0:t.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(i.getPropertyValue("height")),n=Math.max(0,parseInt(i.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),a=r-(parseInt(o.getPropertyValue("padding-top"))+parseInt(o.getPropertyValue("padding-bottom")));return{cols:Math.max(2,Math.floor((n-(parseInt(o.getPropertyValue("padding-right"))+parseInt(o.getPropertyValue("padding-left")))-s)/e.css.cell.width)),rows:Math.max(1,Math.floor(a/e.css.cell.height))}}},t})(),t.exports=e()},911:(t,e,s)=>{"use strict";function i(){let{onlyFirst:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?".concat("(?:\\u0007|\\u001B\\u005C|\\u009C)",")"),"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),t?void 0:"g")}s.d(e,{A:()=>i})},4787:(t,e,s)=>{"use strict";let i,r;s.d(e,{io:()=>tT});var n,o={};s.r(o),s.d(o,{Decoder:()=>tm,Encoder:()=>ty,PacketType:()=>n,protocol:()=>tf});let a=Object.create(null);a.open="0",a.close="1",a.ping="2",a.pong="3",a.message="4",a.upgrade="5",a.noop="6";let h=Object.create(null);Object.keys(a).forEach(t=>{h[a[t]]=t});let c={type:"error",data:"parser error"},l="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),p="function"==typeof ArrayBuffer,u=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,d=({type:t,data:e},s,i)=>l&&e instanceof Blob?s?i(e):f(e,i):p&&(e instanceof ArrayBuffer||u(e))?s?i(e):f(new Blob([e]),i):i(a[t]+(e||"")),f=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function y(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<g.length;t++)m[g.charCodeAt(t)]=t;let _=t=>{let e=.75*t.length,s=t.length,i,r=0,n,o,a,h;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let c=new ArrayBuffer(e),l=new Uint8Array(c);for(i=0;i<s;i+=4)n=m[t.charCodeAt(i)],o=m[t.charCodeAt(i+1)],a=m[t.charCodeAt(i+2)],h=m[t.charCodeAt(i+3)],l[r++]=n<<2|o>>4,l[r++]=(15&o)<<4|a>>2,l[r++]=(3&a)<<6|63&h;return c},b="function"==typeof ArrayBuffer,v=(t,e)=>{if("string"!=typeof t)return{type:"message",data:k(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:w(t.substring(1),e)}:h[s]?t.length>1?{type:h[s],data:t.substring(1)}:{type:h[s]}:c},w=(t,e)=>b?k(_(t),e):{base64:!0,data:t},k=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,E=(t,e)=>{let s=t.length,i=Array(s),r=0;t.forEach((t,n)=>{d(t,!1,t=>{i[n]=t,++r===s&&e(i.join("\x1e"))})})},A=(t,e)=>{let s=t.split("\x1e"),i=[];for(let t=0;t<s.length;t++){let r=v(s[t],e);if(i.push(r),"error"===r.type)break}return i};function T(t){return t.reduce((t,e)=>t+e.length,0)}function O(t,e){if(t[0].length===e)return t.shift();let s=new Uint8Array(e),i=0;for(let r=0;r<e;r++)s[r]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].s
|