PageSourceSearch

https://textkits.org/_next/static/chunks/92.826cfdd124d05ef1.js

js textkits.org collected 2026-09-24 10:22:10 UTC 13,009 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[92],{50092:(e,t,r)=>{r.d(t,{$J:()=>S,Bg:()=>j,D9:()=>s,DJ:()=>i,EY:()=>n,Gu:()=>a,Jk:()=>T,Lk:()=>U,UX:()=>b,f7:()=>E,fr:()=>o,fx:()=>x,io:()=>A,py:()=>F,s9:()=>D,x5:()=>f,yG:()=>l,yX:()=>c,zd:()=>u});let n=2e5,o=24,i=24,a=10,l=5242880,u=0x1900000,c=[{value:"hex",label:"Spaced hex"},{value:"x-escape",label:"Byte escapes"},{value:"percent",label:"Percent bytes"},{value:"decimal",label:"Decimal bytes"},{value:"octal",label:"Octal bytes"},{value:"custom",label:"Custom template"}],f=[{value:"utf-8",label:"UTF-8"},{value:"utf-16le",label:"UTF-16 LE"},{value:"utf-16be",label:"UTF-16 BE"},{value:"windows-1252",label:"Windows-1252"},{value:"iso-8859-2",label:"ISO-8859-2"},{value:"shift_jis",label:"Shift_JIS"},{value:"gb18030",label:"GB18030"}],s=[{label:"Caf\xe9 + CJK",value:"Caf\xe9 你好 €"},{label:"Emoji + combining",value:"\uD83D\uDE00 café \xb7 \uD83D\uDC69‍\uD83D\uDCBB"}],d=new Map([[65279,"BOM"],[160,"NBSP"],[173,"Soft hyphen"],[8203,"Zero-width space"],[8204,"Zero-width non-joiner"],[8205,"Zero-width joiner"],[8206,"Left-to-right mark"],[8207,"Right-to-left mark"],[8288,"Word joiner"]]);function h(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?new Uint8Array(e):Uint8Array.from(null!=e?e:[])}function g(e){return Number(e).toString(16).toUpperCase().padStart(2,"0")}function p(e){return Number(e).toString(16).toUpperCase().padStart(4,"0")}function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(e).slice(0,n)}function y(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new TextEncoder().encode(b(e))}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0x{HEX}, ",n=h(e);if("hex"===t)return Array.from(n,g).join(" ");if("x-escape"===t)return Array.from(n,e=>"\\x".concat(g(e))).join("");if("percent"===t)return Array.from(n,e=>"%".concat(g(e))).join("");if("decimal"===t)return Array.from(n,e=>String(e)).join(" ");if("octal"===t)return Array.from(n,e=>e.toString(8).padStart(3,"0")).join(" ");if("custom"===t){let e=x(n,r);return e.ok?e.output:""}throw Error("Unsupported byte format: ".concat(t))}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0x{HEX}, ",r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e),r=["{hex}","{HEX}","{dec}","{oct}","{index}"];if(!t.trim())return{ok:!1,error:"Enter a template such as 0x{HEX}, "};if(t.length>80)return{ok:!1,error:"Keep the custom template at 80 characters or fewer."};if(!r.some(e=>t.includes(e)))return{ok:!1,error:"Include at least one supported placeholder."};let n=r.reduce((e,t)=>e.replaceAll(t,""),t);return/[{}]/u.test(n)?{ok:!1,error:"The template contains an unsupported placeholder."}:{ok:!0,error:""}}(t);return r.ok?{ok:!0,error:"",output:Array.from(h(e),(e,r)=>String(t).replaceAll("{hex}",e.toString(16).padStart(2,"0")).replaceAll("{HEX}",g(e)).replaceAll("{dec}",String(e)).replaceAll("{oct}",e.toString(8).padStart(3,"0")).replaceAll("{index}",String(r))).join("")}:{...r,output:""}}function v(e,t,r,n){let o=String(e).trim().split(/[\s,;
1]+/u).filter(Boolean);if(!o.length)return{ok:!0,bytes:new Uint8Array,error:""};let i=[];for(let e=0;e<o.length;e+=1){let a=o[e];if(!r.test(a))return{ok:!1,bytes:new Uint8Array,error:"".concat(n," token ").concat(e+1," (").concat(a,") is invalid."),tokenIndex:e};let l=Number.parseInt(a,t);if(!Number.isInteger(l)||l<0||l>255)return{ok:!1,bytes:new Uint8Array,error:"".concat(n," token ").concat(e+1," must be between 0 and 255."),tokenIndex:e};i.push(l)}return{ok:!0,bytes:Uint8Array.from(i),error:""}}function w(e,t,r){let n,o=String(e).trim();if(!o)return{ok:!0,bytes:new Uint8Array,error:""};let i=[],a=0,l=new RegExp(t.source,t.flags.includes("g")?t.flags:"".concat(t.flags,"g"));for(;n=l.exec(o);){let e=o.slice(a,n.index);if(!/^[\s,;]*$/u.test(e))return{ok:!1,bytes:new Uint8Array,error:"".concat(r," contains unexpected text near offset ").concat(a,".")};i.push(Number.parseInt(n[1],16)),a=l.lastIndex}return i.length&&/^[\s,;]*$/u.test(o.slice(a))?{ok:!0,bytes:Uint8Array.from(i),error:""}:{ok:!1,bytes:new Uint8Array,error:"".concat(r," must contain complete tw
1o-digit byte tokens.")}}function k(e){let t=h(e),r=function(e){let t=h(e),r=0;function n(e,t){return{ok:!1,offset:e,reason:t}}function o(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:191,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Expected a continuation byte between 80 and BF.";return e>=t.length?n(r,"The final UTF-8 sequence is truncated."):t[e]<128||t[e]>191?n(e,"Expected a continuation byte between 80 and BF."):t[e]<o||t[e]>i?n(e,a):null}for(;r<t.length;){let e=t[r];if(e<=127){r+=1;continue}if(192===e||193===e)return n(r,"Overlong two-byte UTF-8 sequence.");if(e>=128&&e<=191)return n(r,"Unexpected continuation byte without a leading byte.");if(e>=194&&e<=223){let e=o(r+1);if(e)return e;r+=2;continue}if(e>=224&&e<=239){let t;if((t=224===e?o(r+1,160,191,"This three-byte sequence is overlong."):237===e?o(r+1,128,159,"UTF-8 cannot encode UTF-16 surrogate code points."):o(r+1))||(t=o(r+2)))return t;r+=3;continue}if(e>=240&&e<=244){let t;if((t=240===e?o(r+1,144,191,"This four-byte sequence is overlong."):244===e?o(r+1,128,143,"The decoded value would be above U+10FFFF."):o(r+1))||(t=o(r+2))||(t=o(r+3)))return t;r+=4;continue}if(e>=245)return n(r,"Leading byte is outside the valid UTF-8 range.");return n(r,"Invalid UTF-8 leading byte.")}return{ok:!0,offset:-1,reason:""}}(t);if(!r.ok)return{...r,text:""};try{return{ok:!0,offset:-1,reason:"",text:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(t)}}catch(e){return{ok:!1,offset:0,reason:"The browser could not decode this UTF-8 sequence.",text:""}}}function A(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",r="auto"===t?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e).trim();return t?/^(?:\\x[0-9a-f]{2}[\s,;]*)+$/iu.test(t)?"x-escape":/^(?:%[0-9a-f]{2}[\s,;]*)+$/iu.test(t)?"percent":/^(?:0x[0-9a-f]{2}[\s,;]*)+$/iu.test(t)?"hex":/^(?:[0-7]{1,3}[\s,;]+)*[0-7]{1,3}$/u.test(t)&&/\b0[0-7]{2}\b/u.test(t)?"octal":/^(?:\d{1,3}[\s,;]+)*\d{1,3}$/u.test(t)&&/\b(?:1\d{2}|2\d{2})\b/u.test(t)?"decimal":"hex":"hex"}(e):t,n=String(e).trim();if("x-escape"===r)return{...w(n,/\\x([0-9a-f]{2})/giu,"Byte escape input"),format:r};if("percent"===r)return{...w(n,/%([0-9a-f]{2})/giu,"Percent-byte input"),format:r};if("decimal"===r)return{...v(n,10,/^\d{1,3}$/u,"Decimal"),format:r};if("octal"===r)return{...v(n,8,/^[0-7]{1,3}$/u,"Octal"),format:r};if("hex"===r){if(!n)return{ok:!0,bytes:new Uint8Array,error:"",format:r};if(/^(?:0x[0-9a-f]{2}[\s,;]*)+$/iu.test(n))return{...w(n,/0x([0-9a-f]{2})/giu,"Hex input"),format:r};if(/^[0-9a-f]+$/iu.test(n)&&n.length%2==0){var o;let e=null!=(o=n.match(/.{2}/gu))?o:[];return{ok:!0,bytes:Uint8Array.from(e,e=>Number.parseInt(e,16)),error:"",format:r}}return{...v(n,16,/^[0-9a-f]{2}$/iu,"Hex"),format:r}}return{ok:!1,bytes:new Uint8Array,error:"Unsupported input format: ".concat(r),format:r}}(t,r);if(!n.ok)return{...n,text:"",offset:null!=(e=n.tokenIndex)?e:0,reason:n.error};let o=k(n.bytes);return{...n,...o,bytes:n.bytes,format:n.format}}function U(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=b(e),n=y(r),o="undefined"!=typeof Intl&&Intl.Segmenter?{count:Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(r)).length,supported:!0}:{count:Array.from(r).length,supported:!1},i=k(n),a=r.normalize("NFC"),l=r.normalize("NFD"),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.from(b(e),(e,t)=>{var r;let n=e.codePointAt(0),o=y(e),i=null!=(r=d.get(n))?r:"",a=RegExp("\\p{Mark}","u").test(e);return{index:t,character:e,display:i?"[".concat(i,"]"):a?"◌".concat(e):e,codePoint:"U+".concat(n.toString(16).toUpperCase().padStart(4,"0")),utf8:m(o,"hex"),byteCount:o.length,invisibleLabel:i}})}(r);return{text:r,bytes:n,codeUnitCount:r.length,codePointCount:Array.from(r).length,graphemeCount:o.count,graphemeSupported:o.supported,byteCount:n.length,byteLimit:Math.max(0,Number(t)||0),byteLimitExceeded:Number(t)>0&&n.length>Number(t),roundTripExact:i.ok&&i.text===r,nfcChanged:a!==r,nfdChanged:l!==r,normalizationLabel:a!==r?"NFC differs":l!==r?"NFD differs":"NFC / NFD stable",rows:u,invisibleRows:u.filter(e=>e.invisibleLabel),outputs:{hex:m(n,"hex"),"x-escape":m(n,"x-escape"),percent:m(n,"percent"),decimal
1:m(n,"decimal"),octal:m(n,"octal"),codePoints:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.from(b(e),e=>"U+".concat(e.codePointAt(0).toString(16).toUpperCase().padStart(4,"0"))).join(" ")}(r),unicodeEscapes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Array.from(b(e),e=>{let t=e.codePointAt(0);if(t<=65535)return"\\u".concat(p(t));let r=t-65536;return"\\u".concat(p(55296+(r>>10)),"\\u").concat(p(56320+(1023&r)))}).join("")}(r),utf16:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=b(e),r=[];for(let e=0;e<t.length;e+=1)r.push(p(t.charCodeAt(e)));return r.join(" ")}(r)}}}function S(e){try{return new TextDecoder(e),!0}catch(e){return!1}}async function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8";if(!S(t))return{ok:!1,text:"",error:"This browser does not support ".concat(t,".")};try{let r=new TextDecoder(t,{fatal:!0});if(e&&"function"==typeof e.stream){let t=e.stream().getReader(),n="";for(;;){let{done:e,value:o}=await t.read();if(e)break;n+=r.decode(o,{stream:!0})}return n+=r.decode(),{ok:!0,text:n,error:""}}if(e&&"function"==typeof e.arrayBuffer)return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8";if(!S(t))return{ok:!1,text:"",error:"This browser does not support ".concat(t,".")};try{let r=new TextDecoder(t,{fatal:!0}).decode(h(e));return{ok:!0,text:r,error:""}}catch(e){return{ok:!1,text:"",error:"The file is not valid ".concat(t," text.")}}}(await e.arrayBuffer(),t);return{ok:!1,text:"",error:"The selected file cannot be read in this browser."}}catch(e){return{ok:!1,text:"",error:"The file is not valid ".concat(t," text.")}}}function E(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=y(e);if(!t)return r;let n=new Uint8Array(r.length+3);return n.set([239,187,191],0),n.set(r,3),n}function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"converted.txt",t=String(e).replace(/[\\/:*?"<>|\u0000-\u001f]/gu,"-").replace(/^\.+/u,"").slice(0,180)||"converted.txt",r=t.lastIndexOf(".");return r>0?"".concat(t.slice(0,r),".utf8").concat(t.slice(r)):"".concat(t,".utf8.txt")}let C=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t+=1){let r=t;for(let e=0;e<8;e+=1)r=1&r?0xedb88320^r>>>1:r>>>1;e[t]=r>>>0}return e})();function I(e,t,r){e.setUint16(t,r,!0)}function N(e,t,r){e.setUint32(t,r>>>0,!0)}function B(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function j(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!e.length)throw Error("Add at least one converted file before creating a ZIP.");if(e.length>a)throw Error("ZIP output is limited to ".concat(a," files."));let t=new TextEncoder,r=[],n=[],o=0;for(let i of e){let e=t.encode(F(i.name)),a=h(i.bytes),l=function(e){let t=0xffffffff;for(let r of h(e))t=C[(t^r)&255]^t>>>8;return(0xffffffff^t)>>>0}(a),u=new Uint8Array(30+e.length),c=new DataView(u.buffer);N(c,0,0x4034b50),I(c,4,20),I(c,6,2048),I(c,8,0),I(c,10,0),I(c,12,0),N(c,14,l),N(c,18,a.length),N(c,22,a.length),I(c,26,e.length),I(c,28,0),u.set(e,30),r.push(u,a);let f=new Uint8Array(46+e.length),s=new DataView(f.buffer);N(s,0,0x2014b50),I(s,4,20),I(s,6,20),I(s,8,2048),I(s,10,0),I(s,12,0),I(s,14,0),N(s,16,l),N(s,20,a.length),N(s,24,a.length),I(s,28,e.length),I(s,30,0),I(s,32,0),I(s,34,0),I(s,36,0),N(s,38,0),N(s,42,o),f.set(e,46),n.push(f),o+=u.length+a.length}let i=B(n),l=new Uint8Array(22),u=new DataView(l.buffer);return N(u,0,0x6054b50),I(u,4,0),I(u,6,0),I(u,8,e.length),I(u,10,e.length),N(u,12,i.length),N(u,16,o),I(u,20,0),B([...r,i,l])}function D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{key:"utf-8-bytes",title:"UTF-8 Bytes",href:"/utf-8-text-converter/",description:"Compact spaced-hex preview; open the full converter for decoding, validation, formats, and files.",output:m(y(b(e).slice(0,180)),"hex")}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.