PageSourceSearch

https://regex101.com/static/580b1af10b8c95ed5968.js

js regex101.com collected 2026-09-24 08:32:03 UTC 9,290 bytes, 1 lines download raw bytes

1var MatchBuf=class e{static __wrap(t){t>>>=0;const n=Object.create(e.prototype);return n.__wbg_ptr=t,MatchBufFinalization.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,MatchBufFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_matchbuf_free(e,0)}clear(){wasm.matchbuf_clear(this.__wbg_ptr)}len(){return wasm.matchbuf_len(this.__wbg_ptr)>>>0}constructor(){const e=wasm.matchbuf_new();return this.__wbg_ptr=e>>>0,MatchBufFinalization.register(this,this.__wbg_ptr,this),this}ptr(){return wasm.matchbuf_ptr(this.__wbg_ptr)>>>0}static withCapacity(t){const n=wasm.matchbuf_withCapacity(t);return e.__wrap(n)}};Symbol.dispose&&(MatchBuf.prototype[Symbol.dispose]=MatchBuf.prototype.free);var RegexState=class e{static __wrap(t){t>>>=0;const n=Object.create(e.prototype);return n.__wbg_ptr=t,RegexStateFinalization.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,RegexStateFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_regexstate_free(e,0)}captureNames(){return takeObject(wasm.regexstate_captureNames(this.__wbg_ptr))}capturesLen(){return wasm.regexstate_capturesLen(this.__wbg_ptr)>>>0}findInto(e,t,n){try{const o=wasm.__wbindgen_add_to_stack_pointer(-16),s=passStringToWasm0(e,wasm.__wbindgen_export2,wasm.__wbindgen_export3),c=WASM_VECTOR_LEN;var a=isLikeNone(t)?0:passStringToWasm0(t,wasm.__wbindgen_export2,wasm.__wbindgen_export3),r=WASM_VECTOR_LEN;_assertClass(n,MatchBuf),wasm.regexstate_findInto(o,this.__wbg_ptr,s,c,a,r,n.__wbg_ptr);var _=getDataViewMemory0().getInt32(o+0,!0),i=getDataViewMemory0().getInt32(o+4,!0);if(getDataViewMemory0().getInt32(o+8,!0))throw takeObject(i);return _>>>0}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}isGlobal(){return 0!==wasm.regexstate_isGlobal(this.__wbg_ptr)}replace(e,t,n,a){let r,_;try{const u=wasm.__wbindgen_add_to_stack_pointer(-16),f=passStringToWasm0(e,wasm.__wbindgen_export2,wasm.__wbindgen_export3),h=WASM_VECTOR_LEN;var i=isLikeNone(t)?0:passStringToWasm0(t,wasm.__wbindgen_export2,wasm.__wbindgen_export3),o=WASM_VECTOR_LEN;const l=passStringToWasm0(n,wasm.__wbindgen_export2,wasm.__wbindgen_export3),y=WASM_VECTOR_LEN;var s=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_export2,wasm.__wbindgen_export3),c=WASM_VECTOR_LEN;wasm.regexstate_replace(u,this.__wbg_ptr,f,h,i,o,l,y,s,c);var w=getDataViewMemory0().getInt32(u+0,!0),g=getDataViewMemory0().getInt32(u+4,!0),d=getDataViewMemory0().getInt32(u+8,!0),m=getDataViewMemory0().getInt32(u+12,!0),p=w,b=g;if(m)throw p=0,b=0,takeObject(d);return r=p,_=b,getStringFromWasm0(p,b)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export4(r,_,1)}}replaceList(e,t,n,a){let r,_;try{const u=wasm.__wbindgen_add_to_stack_pointer(-16),f=passStringToWasm0(e,wasm.__wbindgen_export2,wasm.__wbindgen_export3),h=WASM_VECTOR_LEN;var i=isLikeNone(t)?0:passStringToWasm0(t,wasm.__wbindgen_export2,wasm.__wbindgen_export3),o=WASM_VECTOR_LEN;const l=passStringToWasm0(n,wasm.__wbindgen_export2,wasm.__wbindgen_export3),y=WASM_VECTOR_LEN;var s=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_export2,wasm.__wbindgen_export3),c=WASM_VECTOR_LEN;wasm.regexstate_replaceList(u,this.__wbg_ptr,f,h,i,o,l,y,s,c);var w=getDataViewMemory0().getInt32(u+0,!0),g=getDataViewMemory0().getInt32(u+4,!0),d=getDataViewMemory0().getInt32(u+8,!0),m=getDataViewMemory0().getInt32(u+12,!0),p=w,b=g;if(m)throw p=0,b=0,takeObject(d);return r=p,_=b,getStringFromWasm0(p,b)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_export4(r,_,1)}}replacementCount(){return wasm.regexstate_replacementCount(this.__wbg_ptr)>>>0}};function regex_state_new(e,t,n){try{const o=wasm.__wbindgen_add_to_stack_pointer(-16),s=passStringToWasm0(e,wasm.__wbindgen_export2,wasm.__wbindgen_export3),c=WASM_VECTOR_LEN,w=passStringToWasm0(t,wasm.__wbindgen_export2,wasm.__wbindgen_export3),g=WASM_VECTOR_LEN;var a=isLikeNone(n)?0:passStringToWasm0(n,wasm.__wbindgen_export2,wasm.__wbindgen_export3),r=WASM_VECTOR_LEN;wasm.regex_state_new(o,s,c,w,g,a,r);var _=getDataViewMemory0().getInt32(o+0,!0),i=getDataViewMemory0().getInt32(o+4,!0);if(getDataViewMemory0().getInt32(o+8,!0))throw takeObject(i);return RegexState.__wrap(_)}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}function __wbg_get_imports(){return{__proto__:null,"./wasm_regex_bg.js":{__proto__:null,__wbg___wbindgen_throw_be289d5034ed271b:function(e,t){throw new Error(getStringFromWasm0(e,t))},__wbg_new_361308b2356cecd0:function(){return addHeapObject(new Object)},__wbg_new_3eb36ae241fe6f44:function(){return addHeapObject(new Array)},__wbg_push_8ffdcb2063340ba5:function(e,t){return getObject(e).push(getObject(t))},__wbg_set_6cb8631f80447a67:function(){return handleError(function(e,t,n){return Reflect.set(getObject(e),getObject(t),getObject(n))},arguments)},__wbindgen_cast_0000000000000001:function(e,t){return addHeapObject(getStringFromWasm0(e,t))},__wbindgen_object_drop_ref:function(e){takeObject(e)}}}}Symbol.dispose&&(RegexState.prototype[Symbol.dispose]=RegexState.prototype.free);const MatchBufFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>wasm.__wbg_matchbuf_free(e>>>0,1)),RegexStateFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>wasm.__wbg_regexstate_free(e>>>0,1));function addHeapObject(e){heap_next===heap.length&&heap.push(heap.length+1);const t=heap_next;return heap_next=heap[t],heap[t]=e,t}function _assertClass(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}
1function dropObject(e){e<132||(heap[e]=heap_next,heap_next=e)}let cachedDataViewMemory0=null;function getDataViewMemory0(){return(null===cachedDataViewMemory0||!0===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)&&(cachedDataViewMemory0=new DataView(wasm.memory.buffer)),cachedDataViewMemory0}function getStringFromWasm0(e,t){return decodeText(e>>>=0,t)}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){return null!==cachedUint8ArrayMemory0&&0!==cachedUint8ArrayMemory0.byteLength||(cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer)),cachedUint8ArrayMemory0}function getObject(e){return heap[e]}function handleError(e,t){try{return e.apply(this,t)}catch(e){wasm.__wbindgen_export(addHeapObject(e))}}let heap=new Array(128).fill(void 0);heap.push(void 0,null,!0,!1);let heap_next=heap.length;function isLikeNone(e){return null==e}function passStringToWasm0(e,t,n){if(void 0===n){const n=cachedTextEncoder.encode(e),a=t(n.length,1)>>>0;return getUint8ArrayMemory0().subarray(a,a+n.length).set(n),WASM_VECTOR_LEN=n.length,a}let a=e.length,r=t(a,1)>>>0;const _=getUint8ArrayMemory0();let i=0;for(;i<a;i++){const t=e.charCodeAt(i);if(t>127)break;_[r+i]=t}if(i!==a){0!==i&&(e=e.slice(i)),r=n(r,a,a=i+3*e.length,1)>>>0;const t=getUint8ArrayMemory0().subarray(r+i,r+a);i+=cachedTextEncoder.encodeInto(e,t).written,r=n(r,a,i,1)>>>0}return WASM_VECTOR_LEN=i,r}function takeObject(e){const t=getObject(e);return dropObject(e),t}let cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});cachedTextDecoder.decode();const MAX_SAFARI_DECODE_BYTES=2146435072;let numBytesDecoded=0;function decodeText(e,t){return numBytesDecoded+=t,numBytesDecoded>=MAX_SAFARI_DECODE_BYTES&&(cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),cachedTextDecoder.decode(),numBytesDecoded=t),cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(e,e+t))}const cachedTextEncoder=new TextEncoder;"encodeInto"in cachedTextEncoder||(cachedTextEncoder.encodeInto=function(e,t){const n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}});let wasm,WASM_VECTOR_LEN=0;function __wbg_finalize_init(e,t){return wasm=e.exports,cachedDataViewMemory0=null,cachedUint8ArrayMemory0=null,wasm}async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}async function __wbg_init(e){if(void 0!==wasm)return wasm;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?e=e.module_or_path:console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=__wbg_get_imports();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const n=await __wbg_load(await e,t);return __wbg_finalize_init(n.instance,n.module)}export{MatchBuf,RegexState,__wbg_init as default,regex_state_new};

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.