univ-conv
Version:
The universal binary and text converter
1 lines • 8.03 kB
JavaScript
(()=>{"use strict";var e,t,n,r,o={5:(e,t,n)=>{n.d(t,{_:()=>o,f:()=>i});var r=n(689);function o(){return i._UNIV_CONV}class i{async from(e,t){if((0,r.xb)(e,t))return this.empty();const n=await this._from(e,this._initOptions(t));if(void 0!==n)return n;throw new Error(`[${this.constructor.name}] Illegal input: ${(0,r.oL)(e)}`)}isEmpty(e,t){return(0,r.xb)(e,t)&&this._isEmpty(e)}async merge(e,t){return e&&0!==e.length?1===e.length?e[0]:await this._merge(e,this._initOptions(t)):this.empty()}async size(e,t){return this.isEmpty(e,t)?0:await this._size(e,this._initOptions(t))}async toArrayBuffer(e,t){return this.isEmpty(e)?r.vl:await this._toArrayBuffer(e,t)}async toBase64(e,t){return this.isEmpty(e,t)?"":await this._toBase64(e,t)}async toText(e,t){return this.isEmpty(e,t)?"":await this._toText(e,t)}async toUint8Array(e,t){return this.isEmpty(e,t)?r.RJ:await this._toUint8Array(e,t)}_initOptions(e){e||(e={}),null==e.bufferSize&&(e.bufferSize=r.OC);const t=e.bufferSize%6;return 0!==t&&(e.bufferSize-=t,console.info(`"bufferSize" was modified to ${e.bufferSize}. ("bufferSize" must be divisible by 6.)`)),e.inputStringType||(e.inputStringType="text"),e.bufferToTextCharset||(e.bufferToTextCharset="utf8"),e.textToBufferCharset||(e.textToBufferCharset="utf8"),e.outputURL||(e.outputURL="data"),e}}},374:(e,t,n)=>{let r,o,i;n.d(t,{EV:()=>s,FA:()=>T,FQ:()=>x,Mn:()=>y,Os:()=>B,QM:()=>R,S6:()=>S,TO:()=>w,UG:()=>c,aP:()=>A,ai:()=>k,br:()=>b,eo:()=>d,jU:()=>a,tb:()=>E,vg:()=>O,w$:()=>p,wX:()=>l,zH:()=>j,zi:()=>h});let a=!1,u=!1,c=!1;"undefined"!=typeof document?a=!0:"undefined"!=typeof navigator&&"ReactNative"===navigator.product?u=!0:c=!0;let l=!1,f=!1;(async()=>{n.e(811).then(n.t.bind(n,811,23)).then((e=>{l="function"==typeof e.Readable,f="function"==typeof e.Writable}))})();let s,d=!1,p=!1,y=!1,h=!1,b=!1,g=!1;"function"==typeof Blob&&(d=!0,s=new Blob([]),null!=Blob.prototype.text&&(p=!0),null!=Blob.prototype.stream&&(y=!0),null!=Blob.prototype.arrayBuffer&&(h=!0),u||(b=null!=FileReader.prototype.readAsArrayBuffer,FileReader.prototype.readAsBinaryString));let m=!1,v=!1;"function"==typeof ReadableStream&&(m=!0,v=!0);let w,_=!1;function S(e,t){return new Promise(((n,r)=>{const o=new FileReader;o.onerror=function(e){r(o.error||e)},o.onload=function(){n(t(o.result))},e(o)}))}async function O(e,t){const n=e.getReader();try{let r;do{r=await n.read();const e=r.value;if(e&&!await t(e))break}while(!r.done);n.releaseLock(),A(e)}catch(t){n.releaseLock(),A(e,t)}}function B(e){return m&&null!=e&&"function"==typeof e.getReader&&"function"==typeof e.cancel}function T(e){return c&&null!=e&&"function"==typeof e.pipe&&e.readable}async function x(e,t){if(r||(r=(await n.e(811).then(n.t.bind(n,811,23))).Writable),e.destroyed)return;const o=new r({write(e,n,r){t(e).then((e=>{e?r():o.destroy()})).catch((e=>{o.destroy(e)}))}});await function(e,t){return new Promise(((n,r)=>{e.once("error",r),t.once("error",r),t.once("finish",n),e.pipe(t)}))}(e,o)}function A(e,t){e&&(T(e)||function(e){return c&&null!=e&&"function"==typeof e.pipe&&e.writable}(e)?e.destroy(t):B(e)?t?e.cancel(t).catch((e=>console.debug(e))):e.cancel().catch((e=>console.debug(e))):function(e){return v&&null!=e&&"function"==typeof e.getWriter&&"function"==typeof e.close}(e)&&(t?e.abort(t).catch((e=>console.debug(e))):e.close().catch((e=>console.debug(e)))))}async function E(e){o||(o=(await n.e(760).then(n.t.bind(n,760,19))).fileURLToPath),i||(i=(await n.e(576).then(n.t.bind(n,576,23))).createReadStream);const t=o(e);return i(t)}function j(e){return _&&e instanceof Buffer}function R(e){return c?Buffer.alloc(e):new Uint8Array(e)}function k(e){return c?Buffer.from(e):new Uint8Array(e)}"function"==typeof Buffer&&(_=!0,w=Buffer.alloc(0))},354:(e,t,n)=>{n.d(t,{R:()=>o,p:()=>a});var r=n(374);function o(e){const t=e.indexOf(",");return 0<=t?e.substring(t+1):e}let i;async function a(){return i||(i=r.UG?new((await n.e(673).then(n.bind(n,673))).NodeTextHelper):new((await n.e(247).then(n.bind(n,247))).TextHelper)),i}},689:(e,t,n)=>{n.d(t,{OC:()=>r,Q8:()=>u,RJ:()=>i,az:()=>c,oL:()=>f,og:()=>a,vl:()=>o,xb:()=>l});const r=98304,o=new ArrayBuffer(0),i=new Uint8Array(0);function a(e,t){let n,r=e.start??0;return null!=t&&t<r&&(r=t),null==e.length?null!=t&&(n=t):n=r+e.length,null!=t&&null!=n&&t<n&&(n=t),null!=n&&n<r&&(n=r),{start:r,end:n}}function u(e){return delete(e={...e}).start,delete e.length,e}function c(e){return null==e.start&&null==e.length}function l(e,t){return!e||0===t?.length}function f(e){const t=typeof e;return"function"===t||"object"===t?e?.constructor?.name||String.toString.call(e):t}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&r&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+".univ-conv.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="univ-conv:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var u,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),f=0;f<l.length;f++){var s=l[f];if(s.getAttribute("src")==e||s.getAttribute("data-webpack")==r+o){u=s;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.setAttribute("data-webpack",r+o),u.src=e),n[e]=[t];var d=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=d.bind(null,u.onerror),u.onload=d.bind(null,u.onload),c&&document.head.appendChild(u)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={826:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),u=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,r[1](u)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,u,c]=n,l=0;if(i.some((t=>0!==e[t]))){for(r in u)a.o(u,r)&&(a.m[r]=u[r]);c&&c(a)}for(t&&t(n);l<i.length;l++)o=i[l],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkuniv_conv=self.webpackChunkuniv_conv||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{a(689),a(374),a(5);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n<e.length;n++)t[e.charCodeAt(n)]=n;a(354);const r=[];for(let e=0;e<=255;++e){const t=e.toString(16).padStart(2,"0");r.push(t)}})()})();